1+ // Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
2+ // Licensed under the Mozilla Public License v2.0
3+
4+ variable "tenancy_ocid" {}
5+ variable "user_ocid" {}
6+ variable "fingerprint" {}
7+ variable "private_key_path" {}
8+ variable "region" {}
9+ variable "compartment_ocid" {}
10+
11+ variable "knowledge_base_freeform_tags" {
12+ default = { " bar-key" = " value" }
13+ }
14+
15+ variable "knowledge_base_defined_tags" {
16+ default = { " example-tag-namespace-all.example-tag" = " value" }
17+ }
18+
19+ variable "knowledge_base_id" {
20+ default = " id"
21+ }
22+
23+ provider "oci" {
24+ tenancy_ocid = var. tenancy_ocid
25+ user_ocid = var. user_ocid
26+ fingerprint = var. fingerprint
27+ private_key_path = var. private_key_path
28+ region = var. region
29+ }
30+
31+ resource "oci_adm_knowledge_base" "example_knowledge_base" {
32+ # Required
33+ compartment_id = var. compartment_ocid
34+
35+ # Optional
36+ display_name = " Example Knowledge Base"
37+ }
38+
39+ resource "oci_adm_vulnerability_audit" "example_vulnerability_audit" {
40+ # Required
41+ compartment_id = var. compartment_ocid
42+ build_type = " MAVEN"
43+
44+ # Optional
45+ knowledge_base_id = oci_adm_knowledge_base. example_knowledge_base . id
46+ application_dependencies {
47+ gav = " com.google.guava:guava:29.0-jre"
48+ node_id = " node_id"
49+ application_dependency_node_ids = [" node_id" ]
50+ }
51+ display_name = " Example Vulnerability Audit"
52+ }
53+
54+ data "oci_adm_knowledge_base" "example_knowledge_base" {
55+ knowledge_base_id = oci_adm_knowledge_base. example_knowledge_base . id
56+ }
57+
58+ data "oci_adm_knowledge_bases" "example_knowledge_bases" {
59+ compartment_id = var. compartment_ocid
60+ }
61+
62+ data "oci_adm_vulnerability_audit" "example_vulnerability_audit" {
63+ vulnerability_audit_id = oci_adm_vulnerability_audit. example_vulnerability_audit . id
64+ }
0 commit comments