[blazehu@MacBook ~]$ kubectl apply -f provider.yaml provider.terraform.core.oam.dev/tencent created [blazehu@MacBook ~]$ kubectl get provider.terraform.core.oam.dev NAME STATE AGE tencent ready 3m41s
create configuration
[blazehu@MacBook ~]$ kubectl apply -f configuration_hcl_example.yaml configuration.terraform.core.oam.dev/tencent-cos-hcl created [blazehu@MacBook ~]$ kubectl get configuration.terraform.core.oam.dev NAME STATE AGE tencent-cos-hcl ProvisioningAndChecking 13s
[blazehu@MacBook ~]$ k get job NAME COMPLETIONS DURATION AGE tencent-cos-hcl-apply 0/1 3s 3s [blazehu@MacBook ~]$ k get po NAME READY STATUS RESTARTS AGE tencent-cos-hcl-apply-fhpsg 1/1 Running 0 7s . . . . . . [blazehu@MacBook ~]$ k get configuration.terraform.core.oam.dev NAME STATE AGE tencent-cos-hcl Available 4m16s
腾讯云控制台可以观测到 cos bucket 成功创建。
tip: 执行成功后 state 相关内容写入了 secret 里。
delete configuration
[blazehu@MacBook ~]$ k delete -f configuration_hcl_example.yaml configuration.terraform.core.oam.dev "tencent-cos-hcl" deleted
[blazehu@MacBook ~]$ k get job NAME COMPLETIONS DURATION AGE tencent-cos-hcl-apply 1/1 2m55s 5m11s tencent-cos-hcl-destroy 0/1 7s 7s [blazehu@MacBook ~]$ k get pod NAME READY STATUS RESTARTS AGE tencent-cos-hcl-apply-qnfnx 0/1 Completed 3 3m30s tencent-cos-hcl-destroy-vt5b2 0/1 Completed 0 10s