Skip to content

Commit

Permalink
change some schema attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
vandyliu committed Apr 4, 2024
1 parent 777d126 commit 1880e2f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
42 changes: 21 additions & 21 deletions examples/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,31 @@ data "astronomer_workspace" "example" {
id = "cltj71ygr000101qafj5hhihs"
}

output "data_workspace_updated_by" {
value = data.astronomer_workspace.example.created_by
output "data_workspace_example" {
value = data.astronomer_workspace.example
}

resource "astronomer_workspace" "tf_workspace" {
name = "tf-workspace"
name = "tf-workspace-1234"
description = "This is a Terraform created workspace"
cicd_enforced_default = true
}

// terraform import astronomer_workspace.imported_workspace cuid
import {
to = astronomer_workspace.imported_workspace
id = "cltj6pn3v000001owkjx4xhuv"
}
resource "astronomer_workspace" "imported_workspace" {
name = "imported_workspace_2"
description = "hi fred"
cicd_enforced_default = false
}
#
# output "terraform_workspace" {
# value = astronomer_workspace.tf_workspace
# }

output "imported_workspace_updated_by" {
value = astronomer_workspace.imported_workspace.updated_by
}

output "imported_workspace_created_by" {
value = astronomer_workspace.imported_workspace.created_by
}
// terraform import astronomer_workspace.imported_workspace cuid
# import {
# to = astronomer_workspace.imported_workspace
# id = "clukf7a2p000e01oe9pup199x"
# }
# resource "astronomer_workspace" "imported_workspace" {
# name = "imported_workspace"
# description = "hi fred"
# cicd_enforced_default = false
# }
#
# output "imported_workspace" {
# value = astronomer_workspace.imported_workspace
# }
4 changes: 2 additions & 2 deletions internal/provider/schemas/subject_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
func DataSourceSubjectProfileSchema() map[string]datasource.Attribute {
return map[string]datasource.Attribute{
"id": datasource.StringAttribute{
Required: true,
Computed: true,
},
"subject_type": datasource.StringAttribute{
Computed: true,
Expand All @@ -31,7 +31,7 @@ func DataSourceSubjectProfileSchema() map[string]datasource.Attribute {
func ResourceSubjectProfileSchema() map[string]resource.Attribute {
return map[string]resource.Attribute{
"id": resource.StringAttribute{
Required: true,
Computed: true,
},
"subject_type": resource.StringAttribute{
Computed: true,
Expand Down
3 changes: 0 additions & 3 deletions internal/provider/schemas/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ func WorkspaceResourceSchemaAttributes() map[string]resource.Attribute {
MarkdownDescription: "Workspace updater",
Computed: true,
Attributes: ResourceSubjectProfileSchema(),
PlanModifiers: []planmodifier.Object{
objectplanmodifier.UseStateForUnknown(),
},
},
}
}

0 comments on commit 1880e2f

Please sign in to comment.