Skip to content

Commit 1880e2f

Browse files
committed
change some schema attributes
1 parent 777d126 commit 1880e2f

File tree

3 files changed

+23
-26
lines changed

3 files changed

+23
-26
lines changed

examples/main.tf

+21-21
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,31 @@ data "astronomer_workspace" "example" {
2020
id = "cltj71ygr000101qafj5hhihs"
2121
}
2222

23-
output "data_workspace_updated_by" {
24-
value = data.astronomer_workspace.example.created_by
23+
output "data_workspace_example" {
24+
value = data.astronomer_workspace.example
2525
}
2626

2727
resource "astronomer_workspace" "tf_workspace" {
28-
name = "tf-workspace"
28+
name = "tf-workspace-1234"
2929
description = "This is a Terraform created workspace"
30-
cicd_enforced_default = true
31-
}
32-
33-
// terraform import astronomer_workspace.imported_workspace cuid
34-
import {
35-
to = astronomer_workspace.imported_workspace
36-
id = "cltj6pn3v000001owkjx4xhuv"
37-
}
38-
resource "astronomer_workspace" "imported_workspace" {
39-
name = "imported_workspace_2"
40-
description = "hi fred"
4130
cicd_enforced_default = false
4231
}
32+
#
33+
# output "terraform_workspace" {
34+
# value = astronomer_workspace.tf_workspace
35+
# }
4336

44-
output "imported_workspace_updated_by" {
45-
value = astronomer_workspace.imported_workspace.updated_by
46-
}
47-
48-
output "imported_workspace_created_by" {
49-
value = astronomer_workspace.imported_workspace.created_by
50-
}
37+
// terraform import astronomer_workspace.imported_workspace cuid
38+
# import {
39+
# to = astronomer_workspace.imported_workspace
40+
# id = "clukf7a2p000e01oe9pup199x"
41+
# }
42+
# resource "astronomer_workspace" "imported_workspace" {
43+
# name = "imported_workspace"
44+
# description = "hi fred"
45+
# cicd_enforced_default = false
46+
# }
47+
#
48+
# output "imported_workspace" {
49+
# value = astronomer_workspace.imported_workspace
50+
# }

internal/provider/schemas/subject_profile.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
func DataSourceSubjectProfileSchema() map[string]datasource.Attribute {
99
return map[string]datasource.Attribute{
1010
"id": datasource.StringAttribute{
11-
Required: true,
11+
Computed: true,
1212
},
1313
"subject_type": datasource.StringAttribute{
1414
Computed: true,
@@ -31,7 +31,7 @@ func DataSourceSubjectProfileSchema() map[string]datasource.Attribute {
3131
func ResourceSubjectProfileSchema() map[string]resource.Attribute {
3232
return map[string]resource.Attribute{
3333
"id": resource.StringAttribute{
34-
Required: true,
34+
Computed: true,
3535
},
3636
"subject_type": resource.StringAttribute{
3737
Computed: true,

internal/provider/schemas/workspace.go

-3
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,6 @@ func WorkspaceResourceSchemaAttributes() map[string]resource.Attribute {
108108
MarkdownDescription: "Workspace updater",
109109
Computed: true,
110110
Attributes: ResourceSubjectProfileSchema(),
111-
PlanModifiers: []planmodifier.Object{
112-
objectplanmodifier.UseStateForUnknown(),
113-
},
114111
},
115112
}
116113
}

0 commit comments

Comments
 (0)