-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [add_testcase] Added test-case for "intersight_certificatemanagement_policy" Updated the example for the same This testcase is to test the fix of flatten_funtion changes for converting time to string in read function * [add_testcase] Add quotes to variable name * Made private_key and pem_certificate variables private * [add_testcase] Added test-case for "intersight_certificatemanagement_policy" Updated the example for the same This testcase is to test the fix of flatten_funtion changes for converting time to string in read function * [add_testcase] Add quotes to variable name * Made private_key and pem_certificate variables private * [add_testcase] Removed the varibales from tf file as they will be added to internal variables file
- Loading branch information
1 parent
0e18b7a
commit e777c74
Showing
5 changed files
with
62 additions
and
11 deletions.
There are no files selected for viewing
22 changes: 11 additions & 11 deletions
22
examples/certificatemanagement/certificatemanagement_policy.md
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
### Resource Creation | ||
|
||
```hcl | ||
resource "intersight_certificatemanagement_policy" "certificatemanagement_policy1" { | ||
name = "certificatemanagement_policy1" | ||
description = "certificate management policy" | ||
certificates = [{ | ||
object_type = "certificatemanagement.Imc" | ||
certificate = { | ||
object_type = "x509.Certificate" | ||
enabled = true | ||
} | ||
}] | ||
resource "intersight_certificatemanagement_policy" "certificate1" { | ||
description = "sample certificate" | ||
name = "certificate1" | ||
organization { | ||
moid = var.organization | ||
object_type = "organization.Organization" | ||
moid = var.organization_organization | ||
} | ||
certificates { | ||
certificate { | ||
pem_certificate = var.pem_certificate | ||
} | ||
enabled = true | ||
privatekey = var.privatekey | ||
} | ||
} | ||
``` |
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,16 @@ | ||
resource "intersight_certificatemanagement_policy" "certificate1" { | ||
description = "sample certificate" | ||
name = "certificate1" | ||
organization { | ||
moid = data.intersight_organization_organization.default.results.0.moid | ||
object_type = "organization.Organization" | ||
} | ||
certificates { | ||
certificate { | ||
pem_certificate = var.pem_certificate | ||
} | ||
enabled = true | ||
privatekey = var.privatekey | ||
} | ||
} | ||
|
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,18 @@ | ||
terraform { | ||
required_providers { | ||
intersight = { | ||
source = "CiscoDevNet/intersight" | ||
version = "1.0.15" | ||
} | ||
} | ||
} | ||
|
||
provider "intersight" { | ||
apikey = var.api_key | ||
secretkey = var.secretkey | ||
endpoint = var.endpoint | ||
} | ||
|
||
data "intersight_organization_organization" "default" { | ||
name = "default" | ||
} |
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,3 @@ | ||
api_key = "changeMe" | ||
secret_key = "changeMe" | ||
endpoint = "changeMe" |
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,14 @@ | ||
variable "api_key" { | ||
type = string | ||
description = "API Key Id from Intersight" | ||
} | ||
|
||
variable "secretkey" { | ||
type = string | ||
description = "Secret Key File Path or String" | ||
} | ||
|
||
variable "endpoint" { | ||
type = string | ||
description = "Endpoint URL" | ||
} |