aws.inspector2.OrganizationConfiguration
Explore with Pulumi AI
Resource for managing an Amazon Inspector Organization Configuration.
NOTE: In order for this resource to work, the account you use must be an Inspector Delegated Admin Account.
NOTE: When this resource is deleted, EC2, ECR, Lambda, and Lambda code scans will no longer be automatically enabled for new members of your Amazon Inspector organization.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.inspector2.OrganizationConfiguration("example", {autoEnable: {
ec2: true,
ecr: false,
lambda: true,
lambdaCode: true,
}});
import pulumi
import pulumi_aws as aws
example = aws.inspector2.OrganizationConfiguration("example", auto_enable={
"ec2": True,
"ecr": False,
"lambda_": True,
"lambda_code": True,
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/inspector2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := inspector2.NewOrganizationConfiguration(ctx, "example", &inspector2.OrganizationConfigurationArgs{
AutoEnable: &inspector2.OrganizationConfigurationAutoEnableArgs{
Ec2: pulumi.Bool(true),
Ecr: pulumi.Bool(false),
Lambda: pulumi.Bool(true),
LambdaCode: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Inspector2.OrganizationConfiguration("example", new()
{
AutoEnable = new Aws.Inspector2.Inputs.OrganizationConfigurationAutoEnableArgs
{
Ec2 = true,
Ecr = false,
Lambda = true,
LambdaCode = true,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.inspector2.OrganizationConfiguration;
import com.pulumi.aws.inspector2.OrganizationConfigurationArgs;
import com.pulumi.aws.inspector2.inputs.OrganizationConfigurationAutoEnableArgs;
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 example = new OrganizationConfiguration("example", OrganizationConfigurationArgs.builder()
.autoEnable(OrganizationConfigurationAutoEnableArgs.builder()
.ec2(true)
.ecr(false)
.lambda(true)
.lambdaCode(true)
.build())
.build());
}
}
resources:
example:
type: aws:inspector2:OrganizationConfiguration
properties:
autoEnable:
ec2: true
ecr: false
lambda: true
lambdaCode: true
Create OrganizationConfiguration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OrganizationConfiguration(name: string, args: OrganizationConfigurationArgs, opts?: CustomResourceOptions);
@overload
def OrganizationConfiguration(resource_name: str,
args: OrganizationConfigurationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OrganizationConfiguration(resource_name: str,
opts: Optional[ResourceOptions] = None,
auto_enable: Optional[OrganizationConfigurationAutoEnableArgs] = None)
func NewOrganizationConfiguration(ctx *Context, name string, args OrganizationConfigurationArgs, opts ...ResourceOption) (*OrganizationConfiguration, error)
public OrganizationConfiguration(string name, OrganizationConfigurationArgs args, CustomResourceOptions? opts = null)
public OrganizationConfiguration(String name, OrganizationConfigurationArgs args)
public OrganizationConfiguration(String name, OrganizationConfigurationArgs args, CustomResourceOptions options)
type: aws:inspector2:OrganizationConfiguration
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 OrganizationConfigurationArgs
- 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 OrganizationConfigurationArgs
- 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 OrganizationConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OrganizationConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OrganizationConfigurationArgs
- 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 exampleorganizationConfigurationResourceResourceFromInspector2organizationConfiguration = new Aws.Inspector2.OrganizationConfiguration("exampleorganizationConfigurationResourceResourceFromInspector2organizationConfiguration", new()
{
AutoEnable = new Aws.Inspector2.Inputs.OrganizationConfigurationAutoEnableArgs
{
Ec2 = false,
Ecr = false,
Lambda = false,
LambdaCode = false,
},
});
example, err := inspector2.NewOrganizationConfiguration(ctx, "exampleorganizationConfigurationResourceResourceFromInspector2organizationConfiguration", &inspector2.OrganizationConfigurationArgs{
AutoEnable: &inspector2.OrganizationConfigurationAutoEnableArgs{
Ec2: pulumi.Bool(false),
Ecr: pulumi.Bool(false),
Lambda: pulumi.Bool(false),
LambdaCode: pulumi.Bool(false),
},
})
var exampleorganizationConfigurationResourceResourceFromInspector2organizationConfiguration = new OrganizationConfiguration("exampleorganizationConfigurationResourceResourceFromInspector2organizationConfiguration", OrganizationConfigurationArgs.builder()
.autoEnable(OrganizationConfigurationAutoEnableArgs.builder()
.ec2(false)
.ecr(false)
.lambda(false)
.lambdaCode(false)
.build())
.build());
exampleorganization_configuration_resource_resource_from_inspector2organization_configuration = aws.inspector2.OrganizationConfiguration("exampleorganizationConfigurationResourceResourceFromInspector2organizationConfiguration", auto_enable={
"ec2": False,
"ecr": False,
"lambda": False,
"lambdaCode": False,
})
const exampleorganizationConfigurationResourceResourceFromInspector2organizationConfiguration = new aws.inspector2.OrganizationConfiguration("exampleorganizationConfigurationResourceResourceFromInspector2organizationConfiguration", {autoEnable: {
ec2: false,
ecr: false,
lambda: false,
lambdaCode: false,
}});
type: aws:inspector2:OrganizationConfiguration
properties:
autoEnable:
ec2: false
ecr: false
lambda: false
lambdaCode: false
OrganizationConfiguration 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 OrganizationConfiguration resource accepts the following input properties:
- Auto
Enable OrganizationConfiguration Auto Enable - Configuration block for auto enabling. See below.
- Auto
Enable OrganizationConfiguration Auto Enable Args - Configuration block for auto enabling. See below.
- auto
Enable OrganizationConfiguration Auto Enable - Configuration block for auto enabling. See below.
- auto
Enable OrganizationConfiguration Auto Enable - Configuration block for auto enabling. See below.
- auto_
enable OrganizationConfiguration Auto Enable Args - Configuration block for auto enabling. See below.
- auto
Enable Property Map - Configuration block for auto enabling. See below.
Outputs
All input properties are implicitly available as output properties. Additionally, the OrganizationConfiguration resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Max
Account boolLimit Reached - Whether your configuration reached the max account limit.
- Id string
- The provider-assigned unique ID for this managed resource.
- Max
Account boolLimit Reached - Whether your configuration reached the max account limit.
- id String
- The provider-assigned unique ID for this managed resource.
- max
Account BooleanLimit Reached - Whether your configuration reached the max account limit.
- id string
- The provider-assigned unique ID for this managed resource.
- max
Account booleanLimit Reached - Whether your configuration reached the max account limit.
- id str
- The provider-assigned unique ID for this managed resource.
- max_
account_ boollimit_ reached - Whether your configuration reached the max account limit.
- id String
- The provider-assigned unique ID for this managed resource.
- max
Account BooleanLimit Reached - Whether your configuration reached the max account limit.
Look up Existing OrganizationConfiguration Resource
Get an existing OrganizationConfiguration 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?: OrganizationConfigurationState, opts?: CustomResourceOptions): OrganizationConfiguration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_enable: Optional[OrganizationConfigurationAutoEnableArgs] = None,
max_account_limit_reached: Optional[bool] = None) -> OrganizationConfiguration
func GetOrganizationConfiguration(ctx *Context, name string, id IDInput, state *OrganizationConfigurationState, opts ...ResourceOption) (*OrganizationConfiguration, error)
public static OrganizationConfiguration Get(string name, Input<string> id, OrganizationConfigurationState? state, CustomResourceOptions? opts = null)
public static OrganizationConfiguration get(String name, Output<String> id, OrganizationConfigurationState 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.
- Auto
Enable OrganizationConfiguration Auto Enable - Configuration block for auto enabling. See below.
- Max
Account boolLimit Reached - Whether your configuration reached the max account limit.
- Auto
Enable OrganizationConfiguration Auto Enable Args - Configuration block for auto enabling. See below.
- Max
Account boolLimit Reached - Whether your configuration reached the max account limit.
- auto
Enable OrganizationConfiguration Auto Enable - Configuration block for auto enabling. See below.
- max
Account BooleanLimit Reached - Whether your configuration reached the max account limit.
- auto
Enable OrganizationConfiguration Auto Enable - Configuration block for auto enabling. See below.
- max
Account booleanLimit Reached - Whether your configuration reached the max account limit.
- auto_
enable OrganizationConfiguration Auto Enable Args - Configuration block for auto enabling. See below.
- max_
account_ boollimit_ reached - Whether your configuration reached the max account limit.
- auto
Enable Property Map - Configuration block for auto enabling. See below.
- max
Account BooleanLimit Reached - Whether your configuration reached the max account limit.
Supporting Types
OrganizationConfigurationAutoEnable, OrganizationConfigurationAutoEnableArgs
- Ec2 bool
- Whether Amazon EC2 scans are automatically enabled for new members of your Amazon Inspector organization.
- Ecr bool
- Whether Amazon ECR scans are automatically enabled for new members of your Amazon Inspector organization.
- Lambda bool
- Whether Lambda Function scans are automatically enabled for new members of your Amazon Inspector organization.
- Lambda
Code bool - Whether AWS Lambda code scans are automatically enabled for new members of your Amazon Inspector organization. Note: Lambda code scanning requires Lambda standard scanning to be activated. Consequently, if you are setting this argument to
true
, you must also set thelambda
argument totrue
. See Scanning AWS Lambda functions with Amazon Inspector for more information.
- Ec2 bool
- Whether Amazon EC2 scans are automatically enabled for new members of your Amazon Inspector organization.
- Ecr bool
- Whether Amazon ECR scans are automatically enabled for new members of your Amazon Inspector organization.
- Lambda bool
- Whether Lambda Function scans are automatically enabled for new members of your Amazon Inspector organization.
- Lambda
Code bool - Whether AWS Lambda code scans are automatically enabled for new members of your Amazon Inspector organization. Note: Lambda code scanning requires Lambda standard scanning to be activated. Consequently, if you are setting this argument to
true
, you must also set thelambda
argument totrue
. See Scanning AWS Lambda functions with Amazon Inspector for more information.
- ec2 Boolean
- Whether Amazon EC2 scans are automatically enabled for new members of your Amazon Inspector organization.
- ecr Boolean
- Whether Amazon ECR scans are automatically enabled for new members of your Amazon Inspector organization.
- lambda Boolean
- Whether Lambda Function scans are automatically enabled for new members of your Amazon Inspector organization.
- lambda
Code Boolean - Whether AWS Lambda code scans are automatically enabled for new members of your Amazon Inspector organization. Note: Lambda code scanning requires Lambda standard scanning to be activated. Consequently, if you are setting this argument to
true
, you must also set thelambda
argument totrue
. See Scanning AWS Lambda functions with Amazon Inspector for more information.
- ec2 boolean
- Whether Amazon EC2 scans are automatically enabled for new members of your Amazon Inspector organization.
- ecr boolean
- Whether Amazon ECR scans are automatically enabled for new members of your Amazon Inspector organization.
- lambda boolean
- Whether Lambda Function scans are automatically enabled for new members of your Amazon Inspector organization.
- lambda
Code boolean - Whether AWS Lambda code scans are automatically enabled for new members of your Amazon Inspector organization. Note: Lambda code scanning requires Lambda standard scanning to be activated. Consequently, if you are setting this argument to
true
, you must also set thelambda
argument totrue
. See Scanning AWS Lambda functions with Amazon Inspector for more information.
- ec2 bool
- Whether Amazon EC2 scans are automatically enabled for new members of your Amazon Inspector organization.
- ecr bool
- Whether Amazon ECR scans are automatically enabled for new members of your Amazon Inspector organization.
- lambda_ bool
- Whether Lambda Function scans are automatically enabled for new members of your Amazon Inspector organization.
- lambda_
code bool - Whether AWS Lambda code scans are automatically enabled for new members of your Amazon Inspector organization. Note: Lambda code scanning requires Lambda standard scanning to be activated. Consequently, if you are setting this argument to
true
, you must also set thelambda
argument totrue
. See Scanning AWS Lambda functions with Amazon Inspector for more information.
- ec2 Boolean
- Whether Amazon EC2 scans are automatically enabled for new members of your Amazon Inspector organization.
- ecr Boolean
- Whether Amazon ECR scans are automatically enabled for new members of your Amazon Inspector organization.
- lambda Boolean
- Whether Lambda Function scans are automatically enabled for new members of your Amazon Inspector organization.
- lambda
Code Boolean - Whether AWS Lambda code scans are automatically enabled for new members of your Amazon Inspector organization. Note: Lambda code scanning requires Lambda standard scanning to be activated. Consequently, if you are setting this argument to
true
, you must also set thelambda
argument totrue
. See Scanning AWS Lambda functions with Amazon Inspector for more information.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.