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

backend/oss: Changes the DescribeEndpoint to DescribeEndpoints to fixes the unsupported sts bug #29167

Merged
merged 1 commit into from
Jul 20, 2021

Conversation

xiaozhu36
Copy link
Contributor

The API DescribeEndpoint does not support STS authorizing and using the DescribeEndpoints instead.

TF_ACC=1 go test -v ./internal/backend/remote-state/oss/ -run=TestBackend -timeout 120m
=== RUN   TestBackend_impl
--- PASS: TestBackend_impl (0.00s)
=== RUN   TestBackendConfig
    backend_test.go:48: TestBackendConfig on *oss.Backend with configs.synthBody{Filename:"<TestWrapConfig>", Values:map[string]cty.Value{"bucket":cty.StringVal("terraform-backend-oss-test"), "key":cty.StringVal("first.tfstate"), "prefix":cty.StringVal("mystate"), "region":cty.StringVal("cn-beijing"), "tablestore_endpoint":cty.StringVal("https://terraformstate.cn-beijing.ots.aliyuncs.com"), "tablestore_table":cty.StringVal("TableStore")}}
--- PASS: TestBackendConfig (0.58s)
=== RUN   TestBackendConfigWorkSpace
    backend_test.go:83: TestBackendConfig on *oss.Backend with configs.synthBody{Filename:"<TestWrapConfig>", Values:map[string]cty.Value{"bucket":cty.StringVal("terraform-backend-oss-test-81"), "key":cty.StringVal("first.tfstate"), "prefix":cty.StringVal("mystate"), "region":cty.StringVal("cn-beijing"), "tablestore_endpoint":cty.StringVal("https://terraformstate.cn-beijing.ots.aliyuncs.com"), "tablestore_table":cty.StringVal("TableStore")}}
--- PASS: TestBackendConfigWorkSpace (1.48s)
=== RUN   TestBackendConfigProfile
    backend_test.go:122: TestBackendConfig on *oss.Backend with configs.synthBody{Filename:"<TestWrapConfig>", Values:map[string]cty.Value{"bucket":cty.StringVal("terraform-backend-oss-test"), "key":cty.StringVal("first.tfstate"), "prefix":cty.StringVal("mystate"), "profile":cty.StringVal("default"), "region":cty.StringVal("cn-beijing"), "tablestore_endpoint":cty.StringVal("https://terraformstate.cn-beijing.ots.aliyuncs.com"), "tablestore_table":cty.StringVal("TableStore")}}
--- PASS: TestBackendConfigProfile (0.56s)
=== RUN   TestBackendConfig_invalidKey
--- PASS: TestBackendConfig_invalidKey (0.00s)
=== RUN   TestBackend
    backend_test.go:168: TestBackendConfig on *oss.Backend with configs.synthBody{Filename:"<TestWrapConfig>", Values:map[string]cty.Value{"bucket":cty.StringVal("terraform-remote-oss-test-60efea39"), "prefix":cty.StringVal("multi/level/path/")}}
    backend_test.go:173: TestBackendConfig on *oss.Backend with configs.synthBody{Filename:"<TestWrapConfig>", Values:map[string]cty.Value{"bucket":cty.StringVal("terraform-remote-oss-test-60efea39"), "prefix":cty.StringVal("multi/level/path/")}}
    testing.go:299: TestBackend: testing state locking for *oss.Backend
    testing.go:299: TestBackend: *oss.Backend: empty string returned for lock, assuming disabled
    testing.go:299: TestBackend: testing state locking for *oss.Backend
    testing.go:299: TestBackend: *oss.Backend: empty string returned for lock, assuming disabled
--- PASS: TestBackend (3.96s)
PASS
ok      github.com/hashicorp/terraform/internal/backend/remote-state/oss        7.852s

@jbardin
Copy link
Member

jbardin commented Jul 20, 2021

Thanks @xiaozhu36!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants