-
Notifications
You must be signed in to change notification settings - Fork 99
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
Addition of new generated resource and data source for pkiTP #1145
base: master
Are you sure you want to change the base?
Conversation
examples/resources/aci_certificate_authority/resource-all-attributes.tf
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you get a chance can you please also rebase before regenerating again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT!
fbb66bb
bae14c2
to
d66746d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you comment your new functions in the generator? Would be very helpful for future reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed up the user config re-ran the CI tests and noticed that some are failing in APIC v5.2.
TestAccDataSourcePkiKeyRingWithDefault
& TestAccResourcePkiKeyRingWithDefault
I suspect because the properties the error is referring to are only in v6.0+
If so, is it possible to add a new option to check version in testAccPreCheck
and skip if the APIC version is not supported? Similar to cloud/apic. I think that would be okay for now instead of having multiple tests with a subset of properties in older versions which would be complicated to generate.
If this PR is already too big we can do the simple version check in a separate PR.
Also, do we have a cloud APIC that I can add to this CI that is in a good state? Just so we can run the cloud tests instead of always skipping in the CI.
@samiib Thanks for running the CI test for this PR. It's a big relief that the test is passing on v6.0 Yeah, I am aware of this issue. When I introduced the test_type functionality we still didn't have a CI in place for TF resource testing that could run tests on multiple versions of APIC. I agree. At this juncture the easy and practical solution is to skip the entire test for a resource on an older version of APIC where the test contains at least one property that is only supported on the latest version of APIC. Yes, we have a cloud APIC but I'm not sure if we should test resources against the cAPIC since it has reached its EoL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you for adding the version check.
// This example is only applicable to Cisco Cloud Network Controller | ||
resource "aci_certificate_authority" "example_tenant" { | ||
parent_dn = aci_tenant.example.id | ||
certificate_chain = <<EOT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you consider doing the second example with a file input example? https://developer.hashicorp.com/terraform/language/functions/file
|
||
const testConfigDefaultMin = `` | ||
|
||
const testConfigFvTenantMinDependencyWithPkiTP = testConfigFvTenantMin + ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are these defined as constants? and not generated?
please also rebase once #1236 is merged |
f540fe4
No description provided.