-
Notifications
You must be signed in to change notification settings - Fork 1
/
aws_flow_logs_s3_bucket.go
47 lines (44 loc) · 1.41 KB
/
aws_flow_logs_s3_bucket.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (c) Illumio, Inc.
// SPDX-License-Identifier: MPL-2.0
package schema
import (
resource_schema "github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
)
var (
awsFlowLogsS3Bucket = Resource{
TypeName: "aws_flow_logs_s3_bucket",
Schema: resource_schema.Schema{
Version: 1,
Description: "Manages CloudSecure access to flow logs in an AWS S3 bucket.",
Attributes: map[string]resource_schema.Attribute{
IDFieldName: idAttribute,
"account_id": StringResourceAttributeWithMode{
StringAttribute: resource_schema.StringAttribute{
MarkdownDescription: "AWS account ID.",
Required: true,
PlanModifiers: []planmodifier.String{
stringplanmodifier.RequiresReplace(),
},
},
attributeWithMode: attributeWithMode{
Mode: ImmutableAttributeMode,
},
},
"s3_bucket_arn": StringResourceAttributeWithMode{
StringAttribute: resource_schema.StringAttribute{
Description: "ARN of the AWS S3 bucket containing flow logs.",
Required: true,
PlanModifiers: []planmodifier.String{
stringplanmodifier.RequiresReplace(),
},
},
attributeWithMode: attributeWithMode{
Mode: ImmutableAttributeMode,
},
},
},
},
}
)