1. Packages
  2. Harbor
  3. API Docs
  4. ConfigSecurity
Harbor v3.10.19 published on Monday, Feb 10, 2025 by Pulumiverse

harbor.ConfigSecurity

Explore with Pulumi AI

Example Usage

resource "harbor_config_security" "main" {
  cve_allowlist = ["CVE-456", "CVE-123"]
  expires_at = "1701167767"
}
Copy

Create ConfigSecurity Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ConfigSecurity(name: string, args: ConfigSecurityArgs, opts?: CustomResourceOptions);
@overload
def ConfigSecurity(resource_name: str,
                   args: ConfigSecurityArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def ConfigSecurity(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   cve_allowlists: Optional[Sequence[str]] = None,
                   expires_at: Optional[int] = None)
func NewConfigSecurity(ctx *Context, name string, args ConfigSecurityArgs, opts ...ResourceOption) (*ConfigSecurity, error)
public ConfigSecurity(string name, ConfigSecurityArgs args, CustomResourceOptions? opts = null)
public ConfigSecurity(String name, ConfigSecurityArgs args)
public ConfigSecurity(String name, ConfigSecurityArgs args, CustomResourceOptions options)
type: harbor:ConfigSecurity
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ConfigSecurityArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ConfigSecurityArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ConfigSecurityArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ConfigSecurityArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ConfigSecurityArgs
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 configSecurityResource = new Harbor.ConfigSecurity("configSecurityResource", new()
{
    CveAllowlists = new[]
    {
        "string",
    },
    ExpiresAt = 0,
});
Copy
example, err := harbor.NewConfigSecurity(ctx, "configSecurityResource", &harbor.ConfigSecurityArgs{
	CveAllowlists: pulumi.StringArray{
		pulumi.String("string"),
	},
	ExpiresAt: pulumi.Int(0),
})
Copy
var configSecurityResource = new ConfigSecurity("configSecurityResource", ConfigSecurityArgs.builder()
    .cveAllowlists("string")
    .expiresAt(0)
    .build());
Copy
config_security_resource = harbor.ConfigSecurity("configSecurityResource",
    cve_allowlists=["string"],
    expires_at=0)
Copy
const configSecurityResource = new harbor.ConfigSecurity("configSecurityResource", {
    cveAllowlists: ["string"],
    expiresAt: 0,
});
Copy
type: harbor:ConfigSecurity
properties:
    cveAllowlists:
        - string
    expiresAt: 0
Copy

ConfigSecurity Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ConfigSecurity resource accepts the following input properties:

CveAllowlists This property is required. List<string>
System allowlist. Vulnerabilities in this list will be ignored when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
ExpiresAt int
The time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.
CveAllowlists This property is required. []string
System allowlist. Vulnerabilities in this list will be ignored when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
ExpiresAt int
The time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.
cveAllowlists This property is required. List<String>
System allowlist. Vulnerabilities in this list will be ignored when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
expiresAt Integer
The time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.
cveAllowlists This property is required. string[]
System allowlist. Vulnerabilities in this list will be ignored when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
expiresAt number
The time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.
cve_allowlists This property is required. Sequence[str]
System allowlist. Vulnerabilities in this list will be ignored when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
expires_at int
The time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.
cveAllowlists This property is required. List<String>
System allowlist. Vulnerabilities in this list will be ignored when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
expiresAt Number
The time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.

Outputs

All input properties are implicitly available as output properties. Additionally, the ConfigSecurity resource produces the following output properties:

CreationTime string
Time of creation of the list.
Id string
The provider-assigned unique ID for this managed resource.
UpdateTime string
Time of update of the list.
CreationTime string
Time of creation of the list.
Id string
The provider-assigned unique ID for this managed resource.
UpdateTime string
Time of update of the list.
creationTime String
Time of creation of the list.
id String
The provider-assigned unique ID for this managed resource.
updateTime String
Time of update of the list.
creationTime string
Time of creation of the list.
id string
The provider-assigned unique ID for this managed resource.
updateTime string
Time of update of the list.
creation_time str
Time of creation of the list.
id str
The provider-assigned unique ID for this managed resource.
update_time str
Time of update of the list.
creationTime String
Time of creation of the list.
id String
The provider-assigned unique ID for this managed resource.
updateTime String
Time of update of the list.

Look up Existing ConfigSecurity Resource

Get an existing ConfigSecurity 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?: ConfigSecurityState, opts?: CustomResourceOptions): ConfigSecurity
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        creation_time: Optional[str] = None,
        cve_allowlists: Optional[Sequence[str]] = None,
        expires_at: Optional[int] = None,
        update_time: Optional[str] = None) -> ConfigSecurity
func GetConfigSecurity(ctx *Context, name string, id IDInput, state *ConfigSecurityState, opts ...ResourceOption) (*ConfigSecurity, error)
public static ConfigSecurity Get(string name, Input<string> id, ConfigSecurityState? state, CustomResourceOptions? opts = null)
public static ConfigSecurity get(String name, Output<String> id, ConfigSecurityState state, CustomResourceOptions options)
resources:  _:    type: harbor:ConfigSecurity    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CreationTime string
Time of creation of the list.
CveAllowlists List<string>
System allowlist. Vulnerabilities in this list will be ignored when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
ExpiresAt int
The time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.
UpdateTime string
Time of update of the list.
CreationTime string
Time of creation of the list.
CveAllowlists []string
System allowlist. Vulnerabilities in this list will be ignored when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
ExpiresAt int
The time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.
UpdateTime string
Time of update of the list.
creationTime String
Time of creation of the list.
cveAllowlists List<String>
System allowlist. Vulnerabilities in this list will be ignored when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
expiresAt Integer
The time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.
updateTime String
Time of update of the list.
creationTime string
Time of creation of the list.
cveAllowlists string[]
System allowlist. Vulnerabilities in this list will be ignored when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
expiresAt number
The time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.
updateTime string
Time of update of the list.
creation_time str
Time of creation of the list.
cve_allowlists Sequence[str]
System allowlist. Vulnerabilities in this list will be ignored when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
expires_at int
The time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.
update_time str
Time of update of the list.
creationTime String
Time of creation of the list.
cveAllowlists List<String>
System allowlist. Vulnerabilities in this list will be ignored when pushing and pulling images. Should be in the format or ["CVE-123", "CVE-145"] or ["CVE-123"]
expiresAt Number
The time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire.
updateTime String
Time of update of the list.

Import

import using the id of the repo

$ pulumi import harbor:index/configSecurity:ConfigSecurity main "7"
Copy

Note that at this point of time Harbor doesn’t has any api endpoint for deleting this list. Only updating the records.

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
harbor pulumiverse/pulumi-harbor
License
Apache-2.0
Notes
This Pulumi package is based on the harbor Terraform Provider.