oci.CloudGuard.SecurityRecipe
Explore with Pulumi AI
This resource provides the Security Recipe resource in Oracle Cloud Infrastructure Cloud Guard service.
Creates a security zone recipe (SecurityRecipe resource), using parameters passed in a CreateSecurityRecipeDetails resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSecurityRecipe = new oci.cloudguard.SecurityRecipe("test_security_recipe", {
compartmentId: compartmentId,
displayName: securityRecipeDisplayName,
securityPolicies: securityRecipeSecurityPolicies,
definedTags: {
"foo-namespace.bar-key": "value",
},
description: securityRecipeDescription,
freeformTags: {
"bar-key": "value",
},
});
import pulumi
import pulumi_oci as oci
test_security_recipe = oci.cloud_guard.SecurityRecipe("test_security_recipe",
compartment_id=compartment_id,
display_name=security_recipe_display_name,
security_policies=security_recipe_security_policies,
defined_tags={
"foo-namespace.bar-key": "value",
},
description=security_recipe_description,
freeform_tags={
"bar-key": "value",
})
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/CloudGuard"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := CloudGuard.NewSecurityRecipe(ctx, "test_security_recipe", &CloudGuard.SecurityRecipeArgs{
CompartmentId: pulumi.Any(compartmentId),
DisplayName: pulumi.Any(securityRecipeDisplayName),
SecurityPolicies: pulumi.Any(securityRecipeSecurityPolicies),
DefinedTags: pulumi.StringMap{
"foo-namespace.bar-key": pulumi.String("value"),
},
Description: pulumi.Any(securityRecipeDescription),
FreeformTags: pulumi.StringMap{
"bar-key": pulumi.String("value"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testSecurityRecipe = new Oci.CloudGuard.SecurityRecipe("test_security_recipe", new()
{
CompartmentId = compartmentId,
DisplayName = securityRecipeDisplayName,
SecurityPolicies = securityRecipeSecurityPolicies,
DefinedTags =
{
{ "foo-namespace.bar-key", "value" },
},
Description = securityRecipeDescription,
FreeformTags =
{
{ "bar-key", "value" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.CloudGuard.SecurityRecipe;
import com.pulumi.oci.CloudGuard.SecurityRecipeArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var testSecurityRecipe = new SecurityRecipe("testSecurityRecipe", SecurityRecipeArgs.builder()
.compartmentId(compartmentId)
.displayName(securityRecipeDisplayName)
.securityPolicies(securityRecipeSecurityPolicies)
.definedTags(Map.of("foo-namespace.bar-key", "value"))
.description(securityRecipeDescription)
.freeformTags(Map.of("bar-key", "value"))
.build());
}
}
resources:
testSecurityRecipe:
type: oci:CloudGuard:SecurityRecipe
name: test_security_recipe
properties:
compartmentId: ${compartmentId}
displayName: ${securityRecipeDisplayName}
securityPolicies: ${securityRecipeSecurityPolicies}
definedTags:
foo-namespace.bar-key: value
description: ${securityRecipeDescription}
freeformTags:
bar-key: value
Create SecurityRecipe Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecurityRecipe(name: string, args: SecurityRecipeArgs, opts?: CustomResourceOptions);
@overload
def SecurityRecipe(resource_name: str,
args: SecurityRecipeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecurityRecipe(resource_name: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
security_policies: Optional[Sequence[str]] = None,
defined_tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None)
func NewSecurityRecipe(ctx *Context, name string, args SecurityRecipeArgs, opts ...ResourceOption) (*SecurityRecipe, error)
public SecurityRecipe(string name, SecurityRecipeArgs args, CustomResourceOptions? opts = null)
public SecurityRecipe(String name, SecurityRecipeArgs args)
public SecurityRecipe(String name, SecurityRecipeArgs args, CustomResourceOptions options)
type: oci:CloudGuard:SecurityRecipe
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SecurityRecipeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SecurityRecipeArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SecurityRecipeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityRecipeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecurityRecipeArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var securityRecipeResource = new Oci.CloudGuard.SecurityRecipe("securityRecipeResource", new()
{
CompartmentId = "string",
DisplayName = "string",
SecurityPolicies = new[]
{
"string",
},
DefinedTags =
{
{ "string", "string" },
},
Description = "string",
FreeformTags =
{
{ "string", "string" },
},
});
example, err := CloudGuard.NewSecurityRecipe(ctx, "securityRecipeResource", &CloudGuard.SecurityRecipeArgs{
CompartmentId: pulumi.String("string"),
DisplayName: pulumi.String("string"),
SecurityPolicies: pulumi.StringArray{
pulumi.String("string"),
},
DefinedTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
FreeformTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var securityRecipeResource = new SecurityRecipe("securityRecipeResource", SecurityRecipeArgs.builder()
.compartmentId("string")
.displayName("string")
.securityPolicies("string")
.definedTags(Map.of("string", "string"))
.description("string")
.freeformTags(Map.of("string", "string"))
.build());
security_recipe_resource = oci.cloud_guard.SecurityRecipe("securityRecipeResource",
compartment_id="string",
display_name="string",
security_policies=["string"],
defined_tags={
"string": "string",
},
description="string",
freeform_tags={
"string": "string",
})
const securityRecipeResource = new oci.cloudguard.SecurityRecipe("securityRecipeResource", {
compartmentId: "string",
displayName: "string",
securityPolicies: ["string"],
definedTags: {
string: "string",
},
description: "string",
freeformTags: {
string: "string",
},
});
type: oci:CloudGuard:SecurityRecipe
properties:
compartmentId: string
definedTags:
string: string
description: string
displayName: string
freeformTags:
string: string
securityPolicies:
- string
SecurityRecipe Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SecurityRecipe resource accepts the following input properties:
- Compartment
Id string - (Updatable) The OCID of the compartment in which to create the recipe
- Display
Name string (Updatable) The recipe's display name.
Avoid entering confidential information.
- Security
Policies List<string> (Updatable) The list of security policy IDs to include in the recipe
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- (Updatable) The recipe's description
- Dictionary<string, string>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- Compartment
Id string - (Updatable) The OCID of the compartment in which to create the recipe
- Display
Name string (Updatable) The recipe's display name.
Avoid entering confidential information.
- Security
Policies []string (Updatable) The list of security policy IDs to include in the recipe
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- (Updatable) The recipe's description
- map[string]string
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- compartment
Id String - (Updatable) The OCID of the compartment in which to create the recipe
- display
Name String (Updatable) The recipe's display name.
Avoid entering confidential information.
- security
Policies List<String> (Updatable) The list of security policy IDs to include in the recipe
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- (Updatable) The recipe's description
- Map<String,String>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- compartment
Id string - (Updatable) The OCID of the compartment in which to create the recipe
- display
Name string (Updatable) The recipe's display name.
Avoid entering confidential information.
- security
Policies string[] (Updatable) The list of security policy IDs to include in the recipe
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description string
- (Updatable) The recipe's description
- {[key: string]: string}
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- compartment_
id str - (Updatable) The OCID of the compartment in which to create the recipe
- display_
name str (Updatable) The recipe's display name.
Avoid entering confidential information.
- security_
policies Sequence[str] (Updatable) The list of security policy IDs to include in the recipe
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description str
- (Updatable) The recipe's description
- Mapping[str, str]
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- compartment
Id String - (Updatable) The OCID of the compartment in which to create the recipe
- display
Name String (Updatable) The recipe's display name.
Avoid entering confidential information.
- security
Policies List<String> (Updatable) The list of security policy IDs to include in the recipe
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- (Updatable) The recipe's description
- Map<String>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecurityRecipe resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Details string - A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the
Failed
state. - Owner string
- The owner of the recipe
- State string
- The current lifecycle state of the recipe
- Time
Created string - The time the recipe was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time the recipe was last updated. An RFC3339 formatted datetime string.
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Details string - A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the
Failed
state. - Owner string
- The owner of the recipe
- State string
- The current lifecycle state of the recipe
- Time
Created string - The time the recipe was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time the recipe was last updated. An RFC3339 formatted datetime string.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details String - A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the
Failed
state. - owner String
- The owner of the recipe
- state String
- The current lifecycle state of the recipe
- time
Created String - The time the recipe was created. An RFC3339 formatted datetime string.
- time
Updated String - The time the recipe was last updated. An RFC3339 formatted datetime string.
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details string - A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the
Failed
state. - owner string
- The owner of the recipe
- state string
- The current lifecycle state of the recipe
- time
Created string - The time the recipe was created. An RFC3339 formatted datetime string.
- time
Updated string - The time the recipe was last updated. An RFC3339 formatted datetime string.
- id str
- The provider-assigned unique ID for this managed resource.
- lifecycle_
details str - A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the
Failed
state. - owner str
- The owner of the recipe
- state str
- The current lifecycle state of the recipe
- time_
created str - The time the recipe was created. An RFC3339 formatted datetime string.
- time_
updated str - The time the recipe was last updated. An RFC3339 formatted datetime string.
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details String - A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the
Failed
state. - owner String
- The owner of the recipe
- state String
- The current lifecycle state of the recipe
- time
Created String - The time the recipe was created. An RFC3339 formatted datetime string.
- time
Updated String - The time the recipe was last updated. An RFC3339 formatted datetime string.
Look up Existing SecurityRecipe Resource
Get an existing SecurityRecipe resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SecurityRecipeState, opts?: CustomResourceOptions): SecurityRecipe
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
lifecycle_details: Optional[str] = None,
owner: Optional[str] = None,
security_policies: Optional[Sequence[str]] = None,
state: Optional[str] = None,
time_created: Optional[str] = None,
time_updated: Optional[str] = None) -> SecurityRecipe
func GetSecurityRecipe(ctx *Context, name string, id IDInput, state *SecurityRecipeState, opts ...ResourceOption) (*SecurityRecipe, error)
public static SecurityRecipe Get(string name, Input<string> id, SecurityRecipeState? state, CustomResourceOptions? opts = null)
public static SecurityRecipe get(String name, Output<String> id, SecurityRecipeState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Compartment
Id string - (Updatable) The OCID of the compartment in which to create the recipe
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- (Updatable) The recipe's description
- Display
Name string (Updatable) The recipe's display name.
Avoid entering confidential information.
- Dictionary<string, string>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- Lifecycle
Details string - A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the
Failed
state. - Owner string
- The owner of the recipe
- Security
Policies List<string> (Updatable) The list of security policy IDs to include in the recipe
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- State string
- The current lifecycle state of the recipe
- Time
Created string - The time the recipe was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time the recipe was last updated. An RFC3339 formatted datetime string.
- Compartment
Id string - (Updatable) The OCID of the compartment in which to create the recipe
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- (Updatable) The recipe's description
- Display
Name string (Updatable) The recipe's display name.
Avoid entering confidential information.
- map[string]string
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- Lifecycle
Details string - A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the
Failed
state. - Owner string
- The owner of the recipe
- Security
Policies []string (Updatable) The list of security policy IDs to include in the recipe
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- State string
- The current lifecycle state of the recipe
- Time
Created string - The time the recipe was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time the recipe was last updated. An RFC3339 formatted datetime string.
- compartment
Id String - (Updatable) The OCID of the compartment in which to create the recipe
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- (Updatable) The recipe's description
- display
Name String (Updatable) The recipe's display name.
Avoid entering confidential information.
- Map<String,String>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- lifecycle
Details String - A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the
Failed
state. - owner String
- The owner of the recipe
- security
Policies List<String> (Updatable) The list of security policy IDs to include in the recipe
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- state String
- The current lifecycle state of the recipe
- time
Created String - The time the recipe was created. An RFC3339 formatted datetime string.
- time
Updated String - The time the recipe was last updated. An RFC3339 formatted datetime string.
- compartment
Id string - (Updatable) The OCID of the compartment in which to create the recipe
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description string
- (Updatable) The recipe's description
- display
Name string (Updatable) The recipe's display name.
Avoid entering confidential information.
- {[key: string]: string}
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- lifecycle
Details string - A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the
Failed
state. - owner string
- The owner of the recipe
- security
Policies string[] (Updatable) The list of security policy IDs to include in the recipe
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- state string
- The current lifecycle state of the recipe
- time
Created string - The time the recipe was created. An RFC3339 formatted datetime string.
- time
Updated string - The time the recipe was last updated. An RFC3339 formatted datetime string.
- compartment_
id str - (Updatable) The OCID of the compartment in which to create the recipe
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description str
- (Updatable) The recipe's description
- display_
name str (Updatable) The recipe's display name.
Avoid entering confidential information.
- Mapping[str, str]
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- lifecycle_
details str - A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the
Failed
state. - owner str
- The owner of the recipe
- security_
policies Sequence[str] (Updatable) The list of security policy IDs to include in the recipe
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- state str
- The current lifecycle state of the recipe
- time_
created str - The time the recipe was created. An RFC3339 formatted datetime string.
- time_
updated str - The time the recipe was last updated. An RFC3339 formatted datetime string.
- compartment
Id String - (Updatable) The OCID of the compartment in which to create the recipe
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- (Updatable) The recipe's description
- display
Name String (Updatable) The recipe's display name.
Avoid entering confidential information.
- Map<String>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
Avoid entering confidential information.
- lifecycle
Details String - A message describing the current state in more detail. For example, this can be used to provide actionable information for a recipe in the
Failed
state. - owner String
- The owner of the recipe
- security
Policies List<String> (Updatable) The list of security policy IDs to include in the recipe
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- state String
- The current lifecycle state of the recipe
- time
Created String - The time the recipe was created. An RFC3339 formatted datetime string.
- time
Updated String - The time the recipe was last updated. An RFC3339 formatted datetime string.
Import
SecurityRecipes can be imported using the id
, e.g.
$ pulumi import oci:CloudGuard/securityRecipe:SecurityRecipe test_security_recipe "id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.