-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
- Loading branch information
1 parent
c314889
commit f8ff94a
Showing
18 changed files
with
430 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
.tools | ||
.gopath | ||
json-kyverno | ||
.terraform/ | ||
.terraform.lock.hcl | ||
tf.plan | ||
tf.plan.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package fileinfo | ||
|
||
import ( | ||
"io/fs" | ||
|
||
"github.com/eddycharly/json-kyverno/pkg/utils/file" | ||
) | ||
|
||
func IsYaml(info fs.FileInfo) bool { | ||
if info.IsDir() { | ||
return false | ||
} | ||
return file.IsYaml(info.Name()) | ||
} | ||
|
||
func IsJson(info fs.FileInfo) bool { | ||
if info.IsDir() { | ||
return false | ||
} | ||
return file.IsJson(info.Name()) | ||
} | ||
|
||
func IsYamlOrJson(info fs.FileInfo) bool { | ||
if info.IsDir() { | ||
return false | ||
} | ||
return file.IsYamlOrJson(info.Name()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package file | ||
|
||
import ( | ||
"path/filepath" | ||
) | ||
|
||
func IsYaml(path string) bool { | ||
ext := filepath.Ext(path) | ||
return ext == ".yml" || ext == ".yaml" | ||
} | ||
|
||
func IsJson(path string) bool { | ||
ext := filepath.Ext(path) | ||
return ext == ".json" | ||
} | ||
|
||
func IsYamlOrJson(path string) bool { | ||
return IsYaml(path) || IsJson(path) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
format_version: '1.1' | ||
terraform_version: 1.4.6 | ||
planned_values: | ||
root_module: | ||
resources: | ||
- address: aws_s3_bucket.example | ||
mode: managed | ||
type: aws_s3_bucket | ||
name: example | ||
provider_name: registry.terraform.io/hashicorp/aws | ||
schema_version: 0 | ||
values: | ||
bucket: my-tf-test-bucket | ||
force_destroy: false | ||
tags: | ||
Environment: Dev | ||
Name: My bucket | ||
Team: Kyverno | ||
tags_all: | ||
Environment: Dev | ||
Name: My bucket | ||
Team: Kyverno | ||
timeouts: | ||
sensitive_values: | ||
cors_rule: [] | ||
grant: [] | ||
lifecycle_rule: [] | ||
logging: [] | ||
object_lock_configuration: [] | ||
replication_configuration: [] | ||
server_side_encryption_configuration: [] | ||
tags: {} | ||
tags_all: {} | ||
versioning: [] | ||
website: [] | ||
resource_changes: | ||
- address: aws_s3_bucket.example | ||
mode: managed | ||
type: aws_s3_bucket | ||
name: example | ||
provider_name: registry.terraform.io/hashicorp/aws | ||
change: | ||
actions: | ||
- create | ||
before: | ||
after: | ||
bucket: my-tf-test-bucket | ||
force_destroy: false | ||
tags: | ||
Environment: Dev | ||
Name: My bucket | ||
Team: Kyverno | ||
tags_all: | ||
Environment: Dev | ||
Name: My bucket | ||
Team: Kyverno | ||
timeouts: | ||
after_unknown: | ||
acceleration_status: true | ||
acl: true | ||
arn: true | ||
bucket_domain_name: true | ||
bucket_prefix: true | ||
bucket_regional_domain_name: true | ||
cors_rule: true | ||
grant: true | ||
hosted_zone_id: true | ||
id: true | ||
lifecycle_rule: true | ||
logging: true | ||
object_lock_configuration: true | ||
object_lock_enabled: true | ||
policy: true | ||
region: true | ||
replication_configuration: true | ||
request_payer: true | ||
server_side_encryption_configuration: true | ||
tags: {} | ||
tags_all: {} | ||
versioning: true | ||
website: true | ||
website_domain: true | ||
website_endpoint: true | ||
before_sensitive: false | ||
after_sensitive: | ||
cors_rule: [] | ||
grant: [] | ||
lifecycle_rule: [] | ||
logging: [] | ||
object_lock_configuration: [] | ||
replication_configuration: [] | ||
server_side_encryption_configuration: [] | ||
tags: {} | ||
tags_all: {} | ||
versioning: [] | ||
website: [] | ||
configuration: | ||
provider_config: | ||
aws: | ||
name: aws | ||
full_name: registry.terraform.io/hashicorp/aws | ||
expressions: | ||
access_key: | ||
constant_value: mock_access_key | ||
region: | ||
constant_value: eu-west-1 | ||
secret_key: | ||
constant_value: mock_secret_key | ||
skip_credentials_validation: | ||
constant_value: true | ||
skip_metadata_api_check: | ||
constant_value: true | ||
skip_requesting_account_id: | ||
constant_value: true | ||
root_module: | ||
resources: | ||
- address: aws_s3_bucket.example | ||
mode: managed | ||
type: aws_s3_bucket | ||
name: example | ||
provider_config_key: aws | ||
expressions: | ||
bucket: | ||
constant_value: my-tf-test-bucket | ||
tags: | ||
constant_value: | ||
Environment: Dev | ||
Name: My bucket | ||
Team: Kyverno | ||
schema_version: 0 |
Oops, something went wrong.