Skip to content

Commit

Permalink
[minor_change] Addition of logic to run tests on only cloud apics bas…
Browse files Browse the repository at this point in the history
…ed on platform flavors in the meta
  • Loading branch information
shrsr committed Mar 4, 2024
1 parent 83eb57c commit 960ba96
Show file tree
Hide file tree
Showing 60 changed files with 1,678 additions and 417 deletions.
1 change: 1 addition & 0 deletions docs/data-sources/annotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ data "aci_annotation" "example_application_epg" {
### Required ###

* `parent_dn` - (string) The distinguished name (DN) of the parent object, possible resources:
- [aci_certificate_store](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/certificate_store) ([cloudCertStore](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/cloudCertStore/overview))
- [aci_application_epg](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/application_epg) ([fvAEPg](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvAEPg/overview))
- [aci_endpoint_tag_ip](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/endpoint_tag_ip) ([fvEpIpTag](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvEpIpTag/overview))
- [aci_endpoint_tag_mac](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/endpoint_tag_mac) ([fvEpMacTag](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvEpMacTag/overview))
Expand Down
9 changes: 6 additions & 3 deletions docs/data-sources/certificate_authority.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ Data source for Certificate Authority

```hcl
data "aci_certificate_authority" "example_certificate_store" {
parent_dn = aci_certificate_store.example.id
name = "test_name"
}
data "aci_certificate_authority" "example_public_key_management" {
parent_dn = aci_public_key_management.example.id
name = "test_name"
Expand All @@ -43,10 +48,8 @@ data "aci_certificate_authority" "example_public_key_management" {
### Required ###

* `parent_dn` - (string) The distinguished name (DN) of the parent object, possible resources:
- [aci_certificate_store](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/certificate_store) ([cloudCertStore](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/cloudCertStore/overview))
- [aci_public_key_management](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/public_key_management) ([pkiEp](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/pkiEp/overview))
- The distinquised name (DN) of classes below can be used but currently there is no available resource for it:
- [cloudCertStore](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/cloudCertStore/overview)

* `name` (name) - (string) The name of the Certificate Authority object.

### Read-Only ###
Expand Down
1 change: 1 addition & 0 deletions docs/resources/annotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ All examples for the Annotation resource can be found in the [examples](https://
### Required ###

* `parent_dn` - (string) The distinguished name (DN) of the parent object, possible resources:
- [aci_certificate_store](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/certificate_store) ([cloudCertStore](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/cloudCertStore/overview))
- [aci_application_epg](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/application_epg) ([fvAEPg](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvAEPg/overview))
- [aci_endpoint_tag_ip](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/endpoint_tag_ip) ([fvEpIpTag](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvEpIpTag/overview))
- [aci_endpoint_tag_mac](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/endpoint_tag_mac) ([fvEpMacTag](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/fvEpMacTag/overview))
Expand Down
33 changes: 27 additions & 6 deletions docs/resources/certificate_authority.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ The configuration snippet below creates a Certificate Authority with only requir

```hcl
resource "aci_certificate_authority" "example_certificate_store" {
parent_dn = aci_certificate_store.example.id
cert_chain = "<<EOT -----BEGIN_CERTIFICATE----- MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00= -----END_CERTIFICATE----- EOT"
name = "test_name"
}
resource "aci_certificate_authority" "example_public_key_management" {
parent_dn = "uni/userext/pkiext"
parent_dn = aci_public_key_management.example.id
cert_chain = "<<EOT -----BEGIN_CERTIFICATE----- MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00= -----END_CERTIFICATE----- EOT"
name = "test_name"
}
Expand All @@ -48,6 +54,23 @@ The configuration snippet below shows all possible attributes of the Certificate

```hcl
resource "aci_certificate_authority" "full_example_certificate_store" {
parent_dn = aci_certificate_store.example.id
annotation = "annotation"
cert_chain = "<<EOT -----BEGIN_CERTIFICATE----- MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00= -----END_CERTIFICATE----- EOT"
description = "description"
name = "test_name"
name_alias = "name_alias"
owner_key = "owner_key"
owner_tag = "owner_tag"
annotations = [
{
key = "annotations_1"
value = "value_1"
}
]
}
resource "aci_certificate_authority" "full_example_public_key_management" {
parent_dn = aci_public_key_management.example.id
annotation = "annotation"
Expand All @@ -74,10 +97,8 @@ All examples for the Certificate Authority resource can be found in the [example
### Required ###

* `parent_dn` - (string) The distinguished name (DN) of the parent object, possible resources:
- [aci_certificate_store](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/certificate_store) ([cloudCertStore](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/cloudCertStore/overview))
- [aci_public_key_management](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/public_key_management) ([pkiEp](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/pkiEp/overview))
- The distinquised name (DN) of classes below can be used but currently there is no available resource for it:
- [cloudCertStore](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/cloudCertStore/overview)

* `cert_chain` (certChain) - (string) The PEM-encoded chain of trust from the trustpoint to a trusted root authority.
* `name` (name) - (string) The name of the Certificate Authority object.

Expand Down Expand Up @@ -106,7 +127,7 @@ All examples for the Certificate Authority resource can be found in the [example
An existing Certificate Authority can be [imported](https://www.terraform.io/docs/import/index.html) into this resource with its distinguished name (DN), via the following command:

```
terraform import aci_certificate_authority.example_public_key_management uni/tn-{name}/certstore/tp-{name}
terraform import aci_certificate_authority.example_certificate_store uni/tn-{name}/certstore/tp-{name}
```

Starting in Terraform version 1.5, an existing Certificate Authority can be imported
Expand All @@ -115,6 +136,6 @@ using [import blocks](https://developer.hashicorp.com/terraform/language/import)
```
import {
id = "uni/tn-{name}/certstore/tp-{name}"
to = aci_certificate_authority.example_public_key_management
to = aci_certificate_authority.example_certificate_store
}
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

data "aci_certificate_authority" "example_certificate_store" {
parent_dn = aci_certificate_store.example.id
name = "test_name"
}

data "aci_certificate_authority" "example_public_key_management" {
parent_dn = aci_public_key_management.example.id
name = "test_name"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@

resource "aci_certificate_authority" "full_example_certificate_store" {
parent_dn = aci_certificate_store.example.id
annotation = "annotation"
cert_chain = "<<EOT -----BEGIN_CERTIFICATE----- MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00= -----END_CERTIFICATE----- EOT"
description = "description"
name = "test_name"
name_alias = "name_alias"
owner_key = "owner_key"
owner_tag = "owner_tag"
annotations = [
{
key = "annotations_1"
value = "value_1"
}
]
}

resource "aci_certificate_authority" "full_example_public_key_management" {
parent_dn = aci_public_key_management.example.id
annotation = "annotation"
Expand Down
8 changes: 7 additions & 1 deletion examples/resources/aci_certificate_authority/resource.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@

resource "aci_certificate_authority" "example_certificate_store" {
parent_dn = aci_certificate_store.example.id
cert_chain = "<<EOT -----BEGIN_CERTIFICATE----- MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00= -----END_CERTIFICATE----- EOT"
name = "test_name"
}

resource "aci_certificate_authority" "example_public_key_management" {
parent_dn = "uni/userext/pkiext"
parent_dn = aci_public_key_management.example.id
cert_chain = "<<EOT -----BEGIN_CERTIFICATE----- MIICODCCAaGgAwIBAgIJAIt8XMntue0VMA0GCSqGSIb3DQEBCwUAMDQxDjAMBgNV BAMMBUFkbWluMRUwEwYDVQQKDAxZb3VyIENvbXBhbnkxCzAJBgNVBAYTAlVTMCAX DTE4MDEwOTAwNTk0NFoYDzIxMTcxMjE2MDA1OTQ0WjA0MQ4wDAYDVQQDDAVBZG1p bjEVMBMGA1UECgwMWW91ciBDb21wYW55MQswCQYDVQQGEwJVUzCBnzANBgkqhkiG 9w0BAQEFAAOBjQAwgYkCgYEAohG/7axtt7CbSaMP7r+2mhTKbNgh0Ww36C7Ta14i v+VmLyKkQHnXinKGhp6uy3Nug+15a+eIu7CrgpBVMQeCiWfsnwRocKcQJWIYDrWl XHxGQn31yYKR6mylE7Dcj3rMFybnyhezr5D8GcP85YRPmwG9H2hO/0Y1FUnWu9Iw AQkCAwEAAaNQME4wHQYDVR0OBBYEFD0jLXfpkrU/ChzRvfruRs/fy1VXMB8GA1Ud IwQYMBaAFD0jLXfpkrU/ChzRvfruRs/fy1VXMAwGA1UdEwQFMAMBAf8wDQYJKoZI hvcNAQELBQADgYEAOmvre+5tgZ0+F3DgsfxNQqLTrGiBgGCIymPkP/cBXXkNuJyl 3ac7tArHQc7WEA4U2R2rZbEq8FC3UJJm4nUVtCPvEh3G9OhN2xwYev79yt6pIn/l KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00= -----END_CERTIFICATE----- EOT"
name = "test_name"
}
43 changes: 11 additions & 32 deletions gen/definitions/classes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ global:

fvTenant:
resource_name: "tenant"
resource_identifier: "tn"

fvAEPg:
resource_name: "application_epg"
Expand Down Expand Up @@ -94,7 +95,6 @@ tagAnnotation:
- "uni/tn-{name}/ctx-{name}/annotationKey-[{key}]"
- "Too many DN formats to display, see model documentation for all possible parents of [tagAnnotation](https://pubhub.devnetcloud.com/media/model-doc-latest/docs/app/index.html#/objects/tagAnnotation/overview)."

<<<<<<< HEAD
fvEpMacTag:
resource_name: "endpoint_tag_mac"
rn_prepend: "eptags"
Expand All @@ -112,36 +112,15 @@ fvEpIpTag:
ui_locations:
- "Tenants -> Policies -> Protocol -> Endpoint Tags -> Endpoint IP"
sub_category: "Tenant Policies"
=======
commHttps:
include: true

# pkiKeyRing:
# contained_by:
# - "polUni"
# rn_prepend: "userext/pkiext"
# dn_formats:
# #- "uni/tn-{name}/certstore/tp-{name}"
# - "uni/userext/pkiext/tp-{name}"

# cloudCertStore:
# rn_format: "uni/tn-{name}"

# pkiKeyRing:
# parent_dn:
# - "uni/userext/pkiext"

pkiTP:
# contained_by:
# - "pkiEp"
parent_dn:
- "uni/userext/pkiext"

# aaaUserEp:
# contained_by:
# - "polUni"
# rn_prepend: "uni"
# dn_formats:
# - "uni/userext"

>>>>>>> b2f52a6d ([minor_change] Addition of new generated resource and data source for pkiTP)
multi_parents:
- rn_prepend: "certstore"
contained_by: "fvTenant"
test_type: "cloud"
- rn_prepend: "uni/userext/pkiext"
contained_by: "polUni"
test_type: "both"
# - contained_by:
# - "pkiEp"

15 changes: 0 additions & 15 deletions gen/definitions/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,8 @@ tagAnnotation:
test_values:
default:
value: "test_value"
parents:
- class_name: "commHttps"
parent_dependency: "commPol"
- class_name: "commPol"
parent_dependency: ""

pkiTP:
parents:
- parent_dn: "uni/userext/pkiext"
- is_explicit_parent_dn: true
resource_required:
- "certChain"
test_values:
Expand Down Expand Up @@ -202,11 +194,4 @@ pkiTP:
KU0Td2OpVyo0eLqjoX5u2G90IBWzhyjFbo+CcKMrSVKj1YOdG0E3OuiJf00=
-----END_CERTIFICATE-----
EOT

# pkiKeyRing:
# test_values:
# default:
# regen: "no"
# all:
# regen: "no"

Loading

0 comments on commit 960ba96

Please sign in to comment.