Skip to content

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

Merged
jbardin merged 1 commit intohashicorp:mainfrom
xiaozhu36:xiaozhu
Jul 20, 2021
Merged

backend/oss: Changes the DescribeEndpoint to DescribeEndpoints to fixes the unsupported sts bug#29167
jbardin merged 1 commit intohashicorp:mainfrom
xiaozhu36:xiaozhu

Conversation

@xiaozhu36
Copy link
Copy Markdown
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
Copy Markdown
Member

jbardin commented Jul 20, 2021

Thanks @xiaozhu36!

@github-actions
Copy link
Copy Markdown
Contributor

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