Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Object Storage service #439

Merged
merged 78 commits into from
Sep 10, 2024

Conversation

Geun-Oh
Copy link
Contributor

@Geun-Oh Geun-Oh commented Sep 6, 2024

Summary

Add Object Storage service(including resource, data source, tests, guide docs and example codes)

Description

  1. objectstorage_bucket_acl.go

  2. objectstorage_bucket_data_source.go

  3. objectstorage_bucket.go

  4. objectstorage_object_acl.go

  5. objectstorage_object_data_source.go

  6. objectstorage_object.go

  7. objectstorage_object_copy.go

  8. resource & datasource test go files

  9. resource & datasource docs(.md) files

Related Issue

Error & Additional

  • This resource is implemented with aws s3 compatible sdk.

chore: Upgrade Go version to v1.21

chore: upgrade Go to v1.21

ci: Set go version 1.21 in GitHub Actions

ci: Upgrade actions version (checkout, setup-go, ci-lint)

ci: Upgrade golangci-lint v1.59
internal/service/objectstorage/objectstorage_object_acl.go Outdated Show resolved Hide resolved
internal/service/objectstorage/objectstorage_object_acl.go Outdated Show resolved Hide resolved
internal/conn/config.go Outdated Show resolved Hide resolved
internal/provider/provider.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@wonchulee wonchulee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Others LGTM 👍

@Geun-Oh
Copy link
Contributor Author

Geun-Oh commented Sep 10, 2024

=== RUN TestAccResourceNcloudObjectStorage_bucket_acl_basic
--- PASS: TestAccResourceNcloudObjectStorage_bucket_acl_basic (18.31s)
=== RUN TestAccDataSourceNcloudObjectStorage_bucket_basic
--- PASS: TestAccDataSourceNcloudObjectStorage_bucket_basic (11.55s)
=== RUN TestAccResourceNcloudObjectStorage_bucket_basic
--- PASS: TestAccResourceNcloudObjectStorage_bucket_basic (11.42s)
=== RUN TestAccResourceNcloudObjectStorage_object_acl_basic
--- PASS: TestAccResourceNcloudObjectStorage_object_acl_basic (26.52s)
=== RUN TestAccResourceNcloudObjectStorage_object_copy_basic
--- PASS: TestAccResourceNcloudObjectStorage_object_copy_basic (31.71s)
=== RUN TestAccDataSourceNcloudObjectStorage_object_basic
--- PASS: TestAccDataSourceNcloudObjectStorage_object_basic (21.80s)
=== RUN TestAccResourceNcloudObjectStorage_object_basic
--- PASS: TestAccResourceNcloudObjectStorage_object_basic (23.24s)
PASS
ok github.com/terraform-providers/terraform-provider-ncloud/internal/service/objectstorage 145.300s

Revert "fix: Fix typo"

This reverts commit 37c7737.

fix: Fix typo
Copy link
Collaborator

@wonchulee wonchulee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@wonchulee wonchulee merged commit e2e4cf4 into NaverCloudPlatform:main Sep 10, 2024
2 checks passed
Geun-Oh added a commit to Geun-Oh/terraform-provider-ncloud that referenced this pull request Sep 10, 2024
* chore: Upgrade Go version to v1.21

chore: Upgrade Go version to v1.21

chore: upgrade Go to v1.21

ci: Set go version 1.21 in GitHub Actions

ci: Upgrade actions version (checkout, setup-go, ci-lint)

ci: Upgrade golangci-lint v1.59

* chore: Install AWS SDK for Object Storage API

* feat: Add S3 Client configuration

* feat: Add Object Storage Resources

* feat: Add objectstorage_bucket resource

* feat: Add objectstorage_bucket_acl resource

* feat: Add objectstorage_object resource

* feat: Add objectstorage_object_acl resource

* fix: add "_bucket" suffix to bucket resource

* feat: Add examples of object storage

* docs: Add initial documentation of object storage

* feat: add type casting function for nested listValue

* feat: Add BucketRegion to bucket chema

* fix: Add detailed schema of grants & type casting method

* chore: Add error exception

* feat: Add regex validator for resource id

* chore: remove redundant EOL

* fix: Remove BucketName, BucketRegion from schema(doesn't provided)

* refactor: Add TrimForIDParsing util

* feat: Add temporary file creation logic

* feat: Add aclOptions for testing

* fix: Removed Unavailable object acl

* feat: Add Bucket data source

* fix: Add new bucket creation for independant testing

* fix: aws.String => ncloud.String

* chore: fix typo

* chore: change string value with constants

* refactor: expand TrimForParsing to parse vairous strings (not only ID)

* feat: use region info from initial configuration

* refactor: Set bucket id same as bucket name

* fix: Add detailed string validator with regex for bucket_name

* feat: Add NewObjectDataSource data source

* refactor: Move ObjectIDParser to object.go

* refactor: Set Object Resource ID with new format

* feat: set independent object testing

* feat: Add Owner info & Creation Date to bucket data source

* feat: Add OwnerID & OwnerDisplayname at object_acl attribute

* fix: set bucket_id & object_id w/o NRN

* docs: Add documentation of object storage resources

* feat: Change format - make resource id with '/' in object storage - object

* feat: Add objectstorage_object_copy

* fix: Change to do not use pointer method

* docs: Add data source documentation of bucket

* docs: Add object_storage_object.md in data-source

* docs: Add object_storage_object_copy.md

* feat: Add CreationDate attribute to bucket

* fix: fix logic to check whether output is nil

* fix: Add format of creationDate

* feat: Delete panic from object_copy Update

* feat: Remove endpoint from Config struct

* fix: Remove Optional keyword from creation_date(computed)

* refactor: set bucket unique value from bucket_id to bucket_name

* fix: Remove unused headbucket

* feat: Add bucket ID (since it uses id for default)

* feat: Add attributes based on HeadObjectOutput

* feat: Add endpoint abstract logic

* refactor: Move post fetch logic into refreshFromOutput

* feat: Add genEndpointWithCode (region, site)

* feat: Add optional endpoint configuration

* feat: Add region formatting logic

* feat: Add Optional variables compatible with aws sdk in object-kind resource

* docs: Update docs with additional attributes

* fix: Remove Object Encryption logic entirely

* feat: Add site variable in example tf code

* chore: Add Error with Diagnostics

* refactor: remove endpoint from providerConfig

* chore: add missed packages

* fix: fix endpoint env to optional

* fix: Parse bucket info after pulling plan data

* refactor: Abstract BucketNameValidator

* fix: Remove optional from creation_date

* fix: Change serverless environment => platform independent

* fix: change id with object_url

* feat: Add attribute documentation

* feat: Add update logic to object_acl

* feat: Add update logic to bucket_acl

* fix: Fix typo

Revert "fix: Fix typo"

This reverts commit 37c7737.

fix: Fix typo
inpyu pushed a commit to inpyu/terraform-provider-ncloud that referenced this pull request Sep 12, 2024
* chore: Upgrade Go version to v1.21

chore: Upgrade Go version to v1.21

chore: upgrade Go to v1.21

ci: Set go version 1.21 in GitHub Actions

ci: Upgrade actions version (checkout, setup-go, ci-lint)

ci: Upgrade golangci-lint v1.59

* chore: Install AWS SDK for Object Storage API

* feat: Add S3 Client configuration

* feat: Add Object Storage Resources

* feat: Add objectstorage_bucket resource

* feat: Add objectstorage_bucket_acl resource

* feat: Add objectstorage_object resource

* feat: Add objectstorage_object_acl resource

* fix: add "_bucket" suffix to bucket resource

* feat: Add examples of object storage

* docs: Add initial documentation of object storage

* feat: add type casting function for nested listValue

* feat: Add BucketRegion to bucket chema

* fix: Add detailed schema of grants & type casting method

* chore: Add error exception

* feat: Add regex validator for resource id

* chore: remove redundant EOL

* fix: Remove BucketName, BucketRegion from schema(doesn't provided)

* refactor: Add TrimForIDParsing util

* feat: Add temporary file creation logic

* feat: Add aclOptions for testing

* fix: Removed Unavailable object acl

* feat: Add Bucket data source

* fix: Add new bucket creation for independant testing

* fix: aws.String => ncloud.String

* chore: fix typo

* chore: change string value with constants

* refactor: expand TrimForParsing to parse vairous strings (not only ID)

* feat: use region info from initial configuration

* refactor: Set bucket id same as bucket name

* fix: Add detailed string validator with regex for bucket_name

* feat: Add NewObjectDataSource data source

* refactor: Move ObjectIDParser to object.go

* refactor: Set Object Resource ID with new format

* feat: set independent object testing

* feat: Add Owner info & Creation Date to bucket data source

* feat: Add OwnerID & OwnerDisplayname at object_acl attribute

* fix: set bucket_id & object_id w/o NRN

* docs: Add documentation of object storage resources

* feat: Change format - make resource id with '/' in object storage - object

* feat: Add objectstorage_object_copy

* fix: Change to do not use pointer method

* docs: Add data source documentation of bucket

* docs: Add object_storage_object.md in data-source

* docs: Add object_storage_object_copy.md

* feat: Add CreationDate attribute to bucket

* fix: fix logic to check whether output is nil

* fix: Add format of creationDate

* feat: Delete panic from object_copy Update

* feat: Remove endpoint from Config struct

* fix: Remove Optional keyword from creation_date(computed)

* refactor: set bucket unique value from bucket_id to bucket_name

* fix: Remove unused headbucket

* feat: Add bucket ID (since it uses id for default)

* feat: Add attributes based on HeadObjectOutput

* feat: Add endpoint abstract logic

* refactor: Move post fetch logic into refreshFromOutput

* feat: Add genEndpointWithCode (region, site)

* feat: Add optional endpoint configuration

* feat: Add region formatting logic

* feat: Add Optional variables compatible with aws sdk in object-kind resource

* docs: Update docs with additional attributes

* fix: Remove Object Encryption logic entirely

* feat: Add site variable in example tf code

* chore: Add Error with Diagnostics

* refactor: remove endpoint from providerConfig

* chore: add missed packages

* fix: fix endpoint env to optional

* fix: Parse bucket info after pulling plan data

* refactor: Abstract BucketNameValidator

* fix: Remove optional from creation_date

* fix: Change serverless environment => platform independent

* fix: change id with object_url

* feat: Add attribute documentation

* feat: Add update logic to object_acl

* feat: Add update logic to bucket_acl

* fix: Fix typo

Revert "fix: Fix typo"

This reverts commit 37c7737.

fix: Fix typo
wonchulee added a commit that referenced this pull request Sep 22, 2024
* feat: migrate loadbalancer sdk to framework

* chore: add error message

* chore: lb 리소스 이름 지정

* fix: idleTimeoutValue null값 개선

* fix: 코드 중복 개선

* fix: delete시 누락된 active 코드 수정

* fix: 코드 리뷰 반영 및 각종 오류 개선

* feat: 기존 리소스와의 호환을 위한 ID값 추가

* feat: types.ListValueFrom 에러처리 추가

* feat: 호환성을 위한 timeout 설정 추가

* refactor: change msg datasource to resource

* fix: change valid length (#434)

* fix(autoscaling): Autoscaling test failure (#436)

* fix: autoscalig acctest

* chore: Upgrade Go version to v1.21

chore: Upgrade Go version to v1.21

chore: upgrade Go to v1.21

ci: Set go version 1.21 in GitHub Actions

ci: Upgrade actions version (checkout, setup-go, ci-lint)

ci: Upgrade golangci-lint v1.59

* feat: Add Object Storage service (#439)

* chore: Upgrade Go version to v1.21

chore: Upgrade Go version to v1.21

chore: upgrade Go to v1.21

ci: Set go version 1.21 in GitHub Actions

ci: Upgrade actions version (checkout, setup-go, ci-lint)

ci: Upgrade golangci-lint v1.59

* chore: Install AWS SDK for Object Storage API

* feat: Add S3 Client configuration

* feat: Add Object Storage Resources

* feat: Add objectstorage_bucket resource

* feat: Add objectstorage_bucket_acl resource

* feat: Add objectstorage_object resource

* feat: Add objectstorage_object_acl resource

* fix: add "_bucket" suffix to bucket resource

* feat: Add examples of object storage

* docs: Add initial documentation of object storage

* feat: add type casting function for nested listValue

* feat: Add BucketRegion to bucket chema

* fix: Add detailed schema of grants & type casting method

* chore: Add error exception

* feat: Add regex validator for resource id

* chore: remove redundant EOL

* fix: Remove BucketName, BucketRegion from schema(doesn't provided)

* refactor: Add TrimForIDParsing util

* feat: Add temporary file creation logic

* feat: Add aclOptions for testing

* fix: Removed Unavailable object acl

* feat: Add Bucket data source

* fix: Add new bucket creation for independant testing

* fix: aws.String => ncloud.String

* chore: fix typo

* chore: change string value with constants

* refactor: expand TrimForParsing to parse vairous strings (not only ID)

* feat: use region info from initial configuration

* refactor: Set bucket id same as bucket name

* fix: Add detailed string validator with regex for bucket_name

* feat: Add NewObjectDataSource data source

* refactor: Move ObjectIDParser to object.go

* refactor: Set Object Resource ID with new format

* feat: set independent object testing

* feat: Add Owner info & Creation Date to bucket data source

* feat: Add OwnerID & OwnerDisplayname at object_acl attribute

* fix: set bucket_id & object_id w/o NRN

* docs: Add documentation of object storage resources

* feat: Change format - make resource id with '/' in object storage - object

* feat: Add objectstorage_object_copy

* fix: Change to do not use pointer method

* docs: Add data source documentation of bucket

* docs: Add object_storage_object.md in data-source

* docs: Add object_storage_object_copy.md

* feat: Add CreationDate attribute to bucket

* fix: fix logic to check whether output is nil

* fix: Add format of creationDate

* feat: Delete panic from object_copy Update

* feat: Remove endpoint from Config struct

* fix: Remove Optional keyword from creation_date(computed)

* refactor: set bucket unique value from bucket_id to bucket_name

* fix: Remove unused headbucket

* feat: Add bucket ID (since it uses id for default)

* feat: Add attributes based on HeadObjectOutput

* feat: Add endpoint abstract logic

* refactor: Move post fetch logic into refreshFromOutput

* feat: Add genEndpointWithCode (region, site)

* feat: Add optional endpoint configuration

* feat: Add region formatting logic

* feat: Add Optional variables compatible with aws sdk in object-kind resource

* docs: Update docs with additional attributes

* fix: Remove Object Encryption logic entirely

* feat: Add site variable in example tf code

* chore: Add Error with Diagnostics

* refactor: remove endpoint from providerConfig

* chore: add missed packages

* fix: fix endpoint env to optional

* fix: Parse bucket info after pulling plan data

* refactor: Abstract BucketNameValidator

* fix: Remove optional from creation_date

* fix: Change serverless environment => platform independent

* fix: change id with object_url

* feat: Add attribute documentation

* feat: Add update logic to object_acl

* feat: Add update logic to bucket_acl

* fix: Fix typo

Revert "fix: Fix typo"

This reverts commit 37c7737.

fix: Fix typo

* [Feat] Add Login Key Data Source (#442)

* feat: add login key data source

* docs: add login key docs

* docs: Fix typo (#438)

* docs(redis): Correct indentation in main.if

* docs(server): Correct indentation in server_products.md

* docs(mysql): Fix typo in mysql_products.md

* docs(mssql): Fix typo in mssql_products.md

* feat: Add documentation about object storage endpoint (#443)

* feat: Add util functions for endpoint formatting

feat: Add documentation about object storage endpoint

feat: Add mapRegionWithEnv util func

docs: Add env configuration guide

feat: remove endpoint from docs

feat: Modify endpoint extracting func

* docs: Add extra comment for optional env

* feat: migrate loadbalancer sdk to framework

* git rebase

* fix: go mod tidy 수정

* feat: lb attribute 추가

* fix: go mod 버전 conflict 수정

* fix: 사용되지 않는 모듈 삭제

* fix(lb): Fix migration Errors

* fix: Add idleTimeout validator

* fix(lb): Handle error properly

* fix: Generalize confictsWithValue validators

* fix: Generalize conflictsWithValue validator again

---------

Co-authored-by: Wonchul Lee <wch.lee@navercorp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants