Oracle Cloud Infrastructure v0.20.0, May 31 23
Oracle Cloud Infrastructure v0.20.0, May 31 23
oci.CloudGuard.SecurityZone
Explore with Pulumi AI
This resource provides the Security Zone resource in Oracle Cloud Infrastructure Cloud Guard service.
Creates a security zone for a compartment. A security zone enforces all security zone policies in a given security zone recipe. Any actions that violate a policy are denied. By default, any subcompartments are also in the same security zone.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testSecurityZone = new Oci.CloudGuard.SecurityZone("testSecurityZone", new()
{
CompartmentId = @var.Compartment_id,
DisplayName = @var.Security_zone_display_name,
SecurityZoneRecipeId = oci_cloud_guard_security_zone_recipe.Test_security_zone_recipe.Id,
DefinedTags =
{
{ "foo-namespace.bar-key", "value" },
},
Description = @var.Security_zone_description,
FreeformTags =
{
{ "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.NewSecurityZone(ctx, "testSecurityZone", &CloudGuard.SecurityZoneArgs{
CompartmentId: pulumi.Any(_var.Compartment_id),
DisplayName: pulumi.Any(_var.Security_zone_display_name),
SecurityZoneRecipeId: pulumi.Any(oci_cloud_guard_security_zone_recipe.Test_security_zone_recipe.Id),
DefinedTags: pulumi.AnyMap{
"foo-namespace.bar-key": pulumi.Any("value"),
},
Description: pulumi.Any(_var.Security_zone_description),
FreeformTags: pulumi.AnyMap{
"bar-key": pulumi.Any("value"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.CloudGuard.SecurityZone;
import com.pulumi.oci.CloudGuard.SecurityZoneArgs;
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 testSecurityZone = new SecurityZone("testSecurityZone", SecurityZoneArgs.builder()
.compartmentId(var_.compartment_id())
.displayName(var_.security_zone_display_name())
.securityZoneRecipeId(oci_cloud_guard_security_zone_recipe.test_security_zone_recipe().id())
.definedTags(Map.of("foo-namespace.bar-key", "value"))
.description(var_.security_zone_description())
.freeformTags(Map.of("bar-key", "value"))
.build());
}
}
import pulumi
import pulumi_oci as oci
test_security_zone = oci.cloud_guard.SecurityZone("testSecurityZone",
compartment_id=var["compartment_id"],
display_name=var["security_zone_display_name"],
security_zone_recipe_id=oci_cloud_guard_security_zone_recipe["test_security_zone_recipe"]["id"],
defined_tags={
"foo-namespace.bar-key": "value",
},
description=var["security_zone_description"],
freeform_tags={
"bar-key": "value",
})
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSecurityZone = new oci.cloudguard.SecurityZone("testSecurityZone", {
compartmentId: _var.compartment_id,
displayName: _var.security_zone_display_name,
securityZoneRecipeId: oci_cloud_guard_security_zone_recipe.test_security_zone_recipe.id,
definedTags: {
"foo-namespace.bar-key": "value",
},
description: _var.security_zone_description,
freeformTags: {
"bar-key": "value",
},
});
resources:
testSecurityZone:
type: oci:CloudGuard:SecurityZone
properties:
#Required
compartmentId: ${var.compartment_id}
displayName: ${var.security_zone_display_name}
securityZoneRecipeId: ${oci_cloud_guard_security_zone_recipe.test_security_zone_recipe.id}
#Optional
definedTags:
foo-namespace.bar-key: value
description: ${var.security_zone_description}
freeformTags:
bar-key: value
Create SecurityZone Resource
new SecurityZone(name: string, args: SecurityZoneArgs, opts?: CustomResourceOptions);
@overload
def SecurityZone(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_zone_recipe_id: Optional[str] = None)
@overload
def SecurityZone(resource_name: str,
args: SecurityZoneArgs,
opts: Optional[ResourceOptions] = None)
func NewSecurityZone(ctx *Context, name string, args SecurityZoneArgs, opts ...ResourceOption) (*SecurityZone, error)
public SecurityZone(string name, SecurityZoneArgs args, CustomResourceOptions? opts = null)
public SecurityZone(String name, SecurityZoneArgs args)
public SecurityZone(String name, SecurityZoneArgs args, CustomResourceOptions options)
type: oci:CloudGuard:SecurityZone
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityZoneArgs
- 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 SecurityZoneArgs
- 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 SecurityZoneArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityZoneArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecurityZoneArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
SecurityZone 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 SecurityZone resource accepts the following input properties:
- Compartment
Id string (Updatable) The OCID of the compartment for the security zone
- Display
Name string (Updatable) The security zone's name
- Security
Zone stringRecipe Id (Updatable) The OCID of the recipe (
SecurityRecipe
) for the security zone** 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, 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 security zone's description
- 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.
- Compartment
Id string (Updatable) The OCID of the compartment for the security zone
- Display
Name string (Updatable) The security zone's name
- Security
Zone stringRecipe Id (Updatable) The OCID of the recipe (
SecurityRecipe
) for the security zone** 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]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 security zone's description
- 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.
- compartment
Id String (Updatable) The OCID of the compartment for the security zone
- display
Name String (Updatable) The security zone's name
- security
Zone StringRecipe Id (Updatable) The OCID of the recipe (
SecurityRecipe
) for the security zone** 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,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 security zone's description
- 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.
- compartment
Id string (Updatable) The OCID of the compartment for the security zone
- display
Name string (Updatable) The security zone's name
- security
Zone stringRecipe Id (Updatable) The OCID of the recipe (
SecurityRecipe
) for the security zone** 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]: 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 security zone's description
- {[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 OCID of the compartment for the security zone
- display_
name str (Updatable) The security zone's name
- security_
zone_ strrecipe_ id (Updatable) The OCID of the recipe (
SecurityRecipe
) for the security zone** 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, 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 security zone's description
- 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.
- compartment
Id String (Updatable) The OCID of the compartment for the security zone
- display
Name String (Updatable) The security zone's name
- security
Zone StringRecipe Id (Updatable) The OCID of the recipe (
SecurityRecipe
) for the security zone** 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<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 security zone's description
- 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 SecurityZone resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Inherited
By List<string>Compartments List of inherited compartments
- Lifecycle
Details string A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state.- Security
Zone stringTarget Id The OCID of the target associated with the security zone
- State string
The current state of the security zone
- Time
Created string The time the security zone was created. An RFC3339 formatted datetime string.
- Time
Updated string The time the security zone was last updated. An RFC3339 formatted datetime string.
- Id string
The provider-assigned unique ID for this managed resource.
- Inherited
By []stringCompartments List of inherited compartments
- Lifecycle
Details string A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state.- Security
Zone stringTarget Id The OCID of the target associated with the security zone
- State string
The current state of the security zone
- Time
Created string The time the security zone was created. An RFC3339 formatted datetime string.
- Time
Updated string The time the security zone was last updated. An RFC3339 formatted datetime string.
- id String
The provider-assigned unique ID for this managed resource.
- inherited
By List<String>Compartments List of inherited compartments
- lifecycle
Details String A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state.- security
Zone StringTarget Id The OCID of the target associated with the security zone
- state String
The current state of the security zone
- time
Created String The time the security zone was created. An RFC3339 formatted datetime string.
- time
Updated String The time the security zone was last updated. An RFC3339 formatted datetime string.
- id string
The provider-assigned unique ID for this managed resource.
- inherited
By string[]Compartments List of inherited compartments
- lifecycle
Details string A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state.- security
Zone stringTarget Id The OCID of the target associated with the security zone
- state string
The current state of the security zone
- time
Created string The time the security zone was created. An RFC3339 formatted datetime string.
- time
Updated string The time the security zone was last updated. An RFC3339 formatted datetime string.
- id str
The provider-assigned unique ID for this managed resource.
- inherited_
by_ Sequence[str]compartments List of inherited compartments
- lifecycle_
details str A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state.- security_
zone_ strtarget_ id The OCID of the target associated with the security zone
- state str
The current state of the security zone
- time_
created str The time the security zone was created. An RFC3339 formatted datetime string.
- time_
updated str The time the security zone was last updated. An RFC3339 formatted datetime string.
- id String
The provider-assigned unique ID for this managed resource.
- inherited
By List<String>Compartments List of inherited compartments
- lifecycle
Details String A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state.- security
Zone StringTarget Id The OCID of the target associated with the security zone
- state String
The current state of the security zone
- time
Created String The time the security zone was created. An RFC3339 formatted datetime string.
- time
Updated String The time the security zone was last updated. An RFC3339 formatted datetime string.
Look up Existing SecurityZone Resource
Get an existing SecurityZone 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?: SecurityZoneState, opts?: CustomResourceOptions): SecurityZone
@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,
inherited_by_compartments: Optional[Sequence[str]] = None,
lifecycle_details: Optional[str] = None,
security_zone_recipe_id: Optional[str] = None,
security_zone_target_id: Optional[str] = None,
state: Optional[str] = None,
time_created: Optional[str] = None,
time_updated: Optional[str] = None) -> SecurityZone
func GetSecurityZone(ctx *Context, name string, id IDInput, state *SecurityZoneState, opts ...ResourceOption) (*SecurityZone, error)
public static SecurityZone Get(string name, Input<string> id, SecurityZoneState? state, CustomResourceOptions? opts = null)
public static SecurityZone get(String name, Output<String> id, SecurityZoneState 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 for the security zone
- 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 security zone's description
- Display
Name string (Updatable) The security zone's name
- 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.
- Inherited
By List<string>Compartments List of inherited compartments
- Lifecycle
Details string A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state.- Security
Zone stringRecipe Id (Updatable) The OCID of the recipe (
SecurityRecipe
) for the security zone** 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
- Security
Zone stringTarget Id The OCID of the target associated with the security zone
- State string
The current state of the security zone
- Time
Created string The time the security zone was created. An RFC3339 formatted datetime string.
- Time
Updated string The time the security zone was last updated. An RFC3339 formatted datetime string.
- Compartment
Id string (Updatable) The OCID of the compartment for the security zone
- 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 security zone's description
- Display
Name string (Updatable) The security zone's name
- 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.
- Inherited
By []stringCompartments List of inherited compartments
- Lifecycle
Details string A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state.- Security
Zone stringRecipe Id (Updatable) The OCID of the recipe (
SecurityRecipe
) for the security zone** 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
- Security
Zone stringTarget Id The OCID of the target associated with the security zone
- State string
The current state of the security zone
- Time
Created string The time the security zone was created. An RFC3339 formatted datetime string.
- Time
Updated string The time the security zone was last updated. An RFC3339 formatted datetime string.
- compartment
Id String (Updatable) The OCID of the compartment for the security zone
- 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 security zone's description
- display
Name String (Updatable) The security zone's name
- 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.
- inherited
By List<String>Compartments List of inherited compartments
- lifecycle
Details String A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state.- security
Zone StringRecipe Id (Updatable) The OCID of the recipe (
SecurityRecipe
) for the security zone** 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
- security
Zone StringTarget Id The OCID of the target associated with the security zone
- state String
The current state of the security zone
- time
Created String The time the security zone was created. An RFC3339 formatted datetime string.
- time
Updated String The time the security zone was last updated. An RFC3339 formatted datetime string.
- compartment
Id string (Updatable) The OCID of the compartment for the security zone
- {[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 security zone's description
- display
Name string (Updatable) The security zone's name
- {[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.
- inherited
By string[]Compartments List of inherited compartments
- lifecycle
Details string A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state.- security
Zone stringRecipe Id (Updatable) The OCID of the recipe (
SecurityRecipe
) for the security zone** 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
- security
Zone stringTarget Id The OCID of the target associated with the security zone
- state string
The current state of the security zone
- time
Created string The time the security zone was created. An RFC3339 formatted datetime string.
- time
Updated string The time the security zone was last updated. An RFC3339 formatted datetime string.
- compartment_
id str (Updatable) The OCID of the compartment for the security zone
- 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 security zone's description
- display_
name str (Updatable) The security zone's name
- 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.
- inherited_
by_ Sequence[str]compartments List of inherited compartments
- lifecycle_
details str A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state.- security_
zone_ strrecipe_ id (Updatable) The OCID of the recipe (
SecurityRecipe
) for the security zone** 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
- security_
zone_ strtarget_ id The OCID of the target associated with the security zone
- state str
The current state of the security zone
- time_
created str The time the security zone was created. An RFC3339 formatted datetime string.
- time_
updated str The time the security zone was last updated. An RFC3339 formatted datetime string.
- compartment
Id String (Updatable) The OCID of the compartment for the security zone
- 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 security zone's description
- display
Name String (Updatable) The security zone's name
- 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.
- inherited
By List<String>Compartments List of inherited compartments
- lifecycle
Details String A message describing the current state in more detail. For example, this can be used to provide actionable information for a zone in the
Failed
state.- security
Zone StringRecipe Id (Updatable) The OCID of the recipe (
SecurityRecipe
) for the security zone** 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
- security
Zone StringTarget Id The OCID of the target associated with the security zone
- state String
The current state of the security zone
- time
Created String The time the security zone was created. An RFC3339 formatted datetime string.
- time
Updated String The time the security zone was last updated. An RFC3339 formatted datetime string.
Import
SecurityZones can be imported using the id
, e.g.
$ pulumi import oci:CloudGuard/securityZone:SecurityZone test_security_zone "id"
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.