1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. CloudGuard
  5. SecurityRecipe
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

oci.CloudGuard.SecurityRecipe

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi

    This resource provides the Security Recipe resource in Oracle Cloud Infrastructure Cloud Guard service.

    Creates a security zone recipe. A security zone recipe is a collection of security zone policies.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testSecurityRecipe = new oci.cloudguard.SecurityRecipe("testSecurityRecipe", {
        compartmentId: _var.compartment_id,
        displayName: _var.security_recipe_display_name,
        securityPolicies: _var.security_recipe_security_policies,
        definedTags: {
            "foo-namespace.bar-key": "value",
        },
        description: _var.security_recipe_description,
        freeformTags: {
            "bar-key": "value",
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_security_recipe = oci.cloud_guard.SecurityRecipe("testSecurityRecipe",
        compartment_id=var["compartment_id"],
        display_name=var["security_recipe_display_name"],
        security_policies=var["security_recipe_security_policies"],
        defined_tags={
            "foo-namespace.bar-key": "value",
        },
        description=var["security_recipe_description"],
        freeform_tags={
            "bar-key": "value",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/CloudGuard"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := CloudGuard.NewSecurityRecipe(ctx, "testSecurityRecipe", &CloudGuard.SecurityRecipeArgs{
    			CompartmentId:    pulumi.Any(_var.Compartment_id),
    			DisplayName:      pulumi.Any(_var.Security_recipe_display_name),
    			SecurityPolicies: pulumi.Any(_var.Security_recipe_security_policies),
    			DefinedTags: pulumi.Map{
    				"foo-namespace.bar-key": pulumi.Any("value"),
    			},
    			Description: pulumi.Any(_var.Security_recipe_description),
    			FreeformTags: pulumi.Map{
    				"bar-key": pulumi.Any("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("testSecurityRecipe", new()
        {
            CompartmentId = @var.Compartment_id,
            DisplayName = @var.Security_recipe_display_name,
            SecurityPolicies = @var.Security_recipe_security_policies,
            DefinedTags = 
            {
                { "foo-namespace.bar-key", "value" },
            },
            Description = @var.Security_recipe_description,
            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(var_.compartment_id())
                .displayName(var_.security_recipe_display_name())
                .securityPolicies(var_.security_recipe_security_policies())
                .definedTags(Map.of("foo-namespace.bar-key", "value"))
                .description(var_.security_recipe_description())
                .freeformTags(Map.of("bar-key", "value"))
                .build());
    
        }
    }
    
    resources:
      testSecurityRecipe:
        type: oci:CloudGuard:SecurityRecipe
        properties:
          #Required
          compartmentId: ${var.compartment_id}
          displayName: ${var.security_recipe_display_name}
          securityPolicies: ${var.security_recipe_security_policies}
          #Optional
          definedTags:
            foo-namespace.bar-key: value
          description: ${var.security_recipe_description}
          freeformTags:
            bar-key: value
    

    Create SecurityRecipe Resource

    new SecurityRecipe(name: string, args: SecurityRecipeArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityRecipe(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       compartment_id: Optional[str] = None,
                       defined_tags: Optional[Mapping[str, Any]] = None,
                       description: Optional[str] = None,
                       display_name: Optional[str] = None,
                       freeform_tags: Optional[Mapping[str, Any]] = None,
                       security_policies: Optional[Sequence[str]] = None)
    @overload
    def SecurityRecipe(resource_name: str,
                       args: SecurityRecipeArgs,
                       opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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:

    CompartmentId string
    (Updatable) The compartment in which to create the recipe
    DisplayName string
    (Updatable) The recipe's name
    SecurityPolicies List<string>

    (Updatable) The list of SecurityPolicy 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

    DefinedTags Dictionary<string, object>
    (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
    FreeformTags Dictionary<string, object>

    (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.

    CompartmentId string
    (Updatable) The compartment in which to create the recipe
    DisplayName string
    (Updatable) The recipe's name
    SecurityPolicies []string

    (Updatable) The list of SecurityPolicy 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

    DefinedTags map[string]interface{}
    (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
    FreeformTags map[string]interface{}

    (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.

    compartmentId String
    (Updatable) The compartment in which to create the recipe
    displayName String
    (Updatable) The recipe's name
    securityPolicies List<String>

    (Updatable) The list of SecurityPolicy 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

    definedTags Map<String,Object>
    (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
    freeformTags Map<String,Object>

    (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.

    compartmentId string
    (Updatable) The compartment in which to create the recipe
    displayName string
    (Updatable) The recipe's name
    securityPolicies string[]

    (Updatable) The list of SecurityPolicy 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

    definedTags {[key: string]: any}
    (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
    freeformTags {[key: string]: any}

    (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 compartment in which to create the recipe
    display_name str
    (Updatable) The recipe's name
    security_policies Sequence[str]

    (Updatable) The list of SecurityPolicy 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

    defined_tags Mapping[str, Any]
    (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
    freeform_tags Mapping[str, Any]

    (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.

    compartmentId String
    (Updatable) The compartment in which to create the recipe
    displayName String
    (Updatable) The recipe's name
    securityPolicies List<String>

    (Updatable) The list of SecurityPolicy 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

    definedTags Map<Any>
    (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
    freeformTags Map<Any>

    (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.
    LifecycleDetails 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 state of the recipe
    TimeCreated string
    The time the recipe was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The time the recipe was last updated. An RFC3339 formatted datetime string.
    Id string
    The provider-assigned unique ID for this managed resource.
    LifecycleDetails 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 state of the recipe
    TimeCreated string
    The time the recipe was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The time the recipe was last updated. An RFC3339 formatted datetime string.
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleDetails 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 state of the recipe
    timeCreated String
    The time the recipe was created. An RFC3339 formatted datetime string.
    timeUpdated String
    The time the recipe was last updated. An RFC3339 formatted datetime string.
    id string
    The provider-assigned unique ID for this managed resource.
    lifecycleDetails 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 state of the recipe
    timeCreated string
    The time the recipe was created. An RFC3339 formatted datetime string.
    timeUpdated 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 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.
    lifecycleDetails 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 state of the recipe
    timeCreated String
    The time the recipe was created. An RFC3339 formatted datetime string.
    timeUpdated 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, Any]] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = 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.
    The following state arguments are supported:
    CompartmentId string
    (Updatable) The compartment in which to create the recipe
    DefinedTags Dictionary<string, object>
    (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
    DisplayName string
    (Updatable) The recipe's name
    FreeformTags Dictionary<string, object>

    (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.

    LifecycleDetails 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
    SecurityPolicies List<string>

    (Updatable) The list of SecurityPolicy 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 state of the recipe
    TimeCreated string
    The time the recipe was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The time the recipe was last updated. An RFC3339 formatted datetime string.
    CompartmentId string
    (Updatable) The compartment in which to create the recipe
    DefinedTags map[string]interface{}
    (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
    DisplayName string
    (Updatable) The recipe's name
    FreeformTags map[string]interface{}

    (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.

    LifecycleDetails 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
    SecurityPolicies []string

    (Updatable) The list of SecurityPolicy 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 state of the recipe
    TimeCreated string
    The time the recipe was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The time the recipe was last updated. An RFC3339 formatted datetime string.
    compartmentId String
    (Updatable) The compartment in which to create the recipe
    definedTags Map<String,Object>
    (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
    displayName String
    (Updatable) The recipe's name
    freeformTags Map<String,Object>

    (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.

    lifecycleDetails 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
    securityPolicies List<String>

    (Updatable) The list of SecurityPolicy 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 state of the recipe
    timeCreated String
    The time the recipe was created. An RFC3339 formatted datetime string.
    timeUpdated String
    The time the recipe was last updated. An RFC3339 formatted datetime string.
    compartmentId string
    (Updatable) The compartment in which to create the recipe
    definedTags {[key: string]: any}
    (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
    displayName string
    (Updatable) The recipe's name
    freeformTags {[key: string]: any}

    (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.

    lifecycleDetails 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
    securityPolicies string[]

    (Updatable) The list of SecurityPolicy 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 state of the recipe
    timeCreated string
    The time the recipe was created. An RFC3339 formatted datetime string.
    timeUpdated string
    The time the recipe was last updated. An RFC3339 formatted datetime string.
    compartment_id str
    (Updatable) The compartment in which to create the recipe
    defined_tags Mapping[str, Any]
    (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 name
    freeform_tags Mapping[str, Any]

    (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 SecurityPolicy 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 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.
    compartmentId String
    (Updatable) The compartment in which to create the recipe
    definedTags Map<Any>
    (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
    displayName String
    (Updatable) The recipe's name
    freeformTags Map<Any>

    (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.

    lifecycleDetails 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
    securityPolicies List<String>

    (Updatable) The list of SecurityPolicy 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 state of the recipe
    timeCreated String
    The time the recipe was created. An RFC3339 formatted datetime string.
    timeUpdated 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"
    

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.29.0 published on Thursday, Mar 28, 2024 by Pulumi