Skip to content

Commit 0d0dd9d

Browse files
committed
Support importing resources
1 parent ca84529 commit 0d0dd9d

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

amplience/resource_content_repository.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ func resourceContentRepository() *schema.Resource {
2323
ReadContext: resourceContentRepositoryRead,
2424
UpdateContext: resourceContentRepositoryUpdate,
2525
DeleteContext: resourceContentRepositoryDelete,
26+
Importer: &schema.ResourceImporter{
27+
StateContext: schema.ImportStatePassthroughContext,
28+
},
2629
Schema: map[string]*schema.Schema{
2730
"hub_id": {
2831
Type: schema.TypeString,

amplience/resource_content_type.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ func resourceContentType() *schema.Resource {
2121
ReadContext: resourceContentTypeRead,
2222
UpdateContext: resourceContentTypeUpdate,
2323
DeleteContext: resourceContentTypeDelete,
24+
Importer: &schema.ResourceImporter{
25+
StateContext: schema.ImportStatePassthroughContext,
26+
},
2427
Schema: map[string]*schema.Schema{
2528
"hub_id": {
2629
Description: "ID of the Hub the Content Type should be registered to",

amplience/resource_content_type_schema.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ func resourceContentTypeSchema() *schema.Resource {
2020
ReadContext: resourceContentTypeSchemaRead,
2121
UpdateContext: resourceContentTypeSchemaUpdate,
2222
DeleteContext: resourceContentTypeSchemaDelete,
23+
Importer: &schema.ResourceImporter{
24+
StateContext: schema.ImportStatePassthroughContext,
25+
},
2326
Schema: map[string]*schema.Schema{
2427
"hub_id": {
2528
Type: schema.TypeString,

0 commit comments

Comments
 (0)