Skip to content

Commit bc101ad

Browse files
committed
Add missing required enterprise org operations
1 parent 03b8b7f commit bc101ad

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.21
55
toolchain go1.22.0
66

77
require (
8-
github.com/datastax/astra-client-go/v2 v2.2.55
8+
github.com/datastax/astra-client-go/v2 v2.2.56
99
github.com/datastax/pulsar-admin-client-go v0.0.0-20230707040954-1a4745e07587
1010
github.com/google/uuid v1.6.0
1111
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
101101
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
102102
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
103103
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
104-
github.com/datastax/astra-client-go/v2 v2.2.55 h1:0xMpU5HC4GpkJ4bp3DYQXMX1iJbYZix8iSEmnMwch54=
105-
github.com/datastax/astra-client-go/v2 v2.2.55/go.mod h1:zxXWuqDkYia7PzFIL3T7RmjChc9LN81UnfI2yB4kE7M=
104+
github.com/datastax/astra-client-go/v2 v2.2.56 h1:pB93zYVWDTobjpqRnER0R3LdhAhoPdSKTeYc7/2X2Uw=
105+
github.com/datastax/astra-client-go/v2 v2.2.56/go.mod h1:zxXWuqDkYia7PzFIL3T7RmjChc9LN81UnfI2yB4kE7M=
106106
github.com/datastax/pulsar-admin-client-go v0.0.0-20230707040954-1a4745e07587 h1:3jv+O0hWcz3oj3sZ9/Ov9/m1Vaqx8Ql8jp5ZeA13O5A=
107107
github.com/datastax/pulsar-admin-client-go v0.0.0-20230707040954-1a4745e07587/go.mod h1:guL8YZ5gJINN+h5Kmja1AnuzhxLU3sHQL8o/8HYLtqk=
108108
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

internal/provider/resource_enterprise_org.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ func resourceEnterpriseOrg() *schema.Resource {
1313
return &schema.Resource{
1414
Description: "`enterprise_org` resource represents an Organization that is created under an Enterprise in Astra.",
1515
CreateContext: resourceEnterpriseOrgCreate,
16+
ReadContext: resourceEnterpriseOrgRead,
17+
DeleteContext: resourceEnterpriseOrgDelete,
1618

1719
Importer: &schema.ResourceImporter{
1820
StateContext: schema.ImportStatePassthroughContext,
@@ -106,6 +108,26 @@ func resourceEnterpriseOrgCreate(ctx context.Context, d *schema.ResourceData, me
106108
return nil
107109
}
108110

111+
func resourceEnterpriseOrgRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
112+
return diag.Diagnostics{
113+
diag.Diagnostic{
114+
Severity: diag.Warning,
115+
Summary: "Read of Enterprise Organizations not supported",
116+
Detail: "Read of Enterprise Organizations not supported.",
117+
},
118+
}
119+
}
120+
121+
func resourceEnterpriseOrgDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
122+
return diag.Diagnostics{
123+
diag.Diagnostic{
124+
Severity: diag.Warning,
125+
Summary: "Delete of Enterprise Organizations not supported",
126+
Detail: "Delete of Enterprise Organizations not supported.",
127+
},
128+
}
129+
}
130+
109131
func setEnterpriseOrgData(d *schema.ResourceData, org *astra.CreateOrgInEnterpriseResponse) error {
110132
if org == nil {
111133
return errors.New("organization is nil")

0 commit comments

Comments
 (0)