Skip to content

Commit

Permalink
v0.0.23: Revert provider model to use 'custom_properties'
Browse files Browse the repository at this point in the history
  • Loading branch information
evanverneyfink committed Mar 25, 2023
1 parent 782b908 commit b42ee2a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/resources/job_profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ resource "mcma_job_profile" "example" {
type = "number"
}
custom = {
custom_properties = {
customprop1 = "customprop1val"
customprop2 = "customprop2val"
}
Expand All @@ -51,7 +51,7 @@ resource "mcma_job_profile" "example" {

### Optional

- `custom` (Map of String) A collection of key-value pairs specifying additional properties for the job profile.
- `custom_properties` (Map of String) A collection of key-value pairs specifying additional properties for the job profile.
- `input_parameter` (Block Set) A list of input parameters (name and type) that must be provided when running a job for this profile. (see [below for nested schema](#nestedblock--input_parameter))
- `output_parameter` (Block Set) A list of output parameters (name and type) that will be set on the job when the service has finished. (see [below for nested schema](#nestedblock--output_parameter))

Expand Down
2 changes: 1 addition & 1 deletion examples/resources/mcma_job_profile/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "mcma_job_profile" "example" {
type = "number"
}

custom = {
custom_properties = {
customprop1 = "customprop1val"
customprop2 = "customprop2val"
}
Expand Down
6 changes: 3 additions & 3 deletions mcma/resource_job_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func resourceJobProfile() *schema.Resource {
},
},
},
"custom": {
"custom_properties": {
Type: schema.TypeMap,
Description: "A collection of key-value pairs specifying additional properties for the job profile.",
Optional: true,
Expand Down Expand Up @@ -134,7 +134,7 @@ func getJobProfileFromResourceData(d *schema.ResourceData) mcmamodel.JobProfile
InputParameters: inputParameters,
OutputParameters: outputParameters,
OptionalInputParameters: optionalInputParameters,
Custom: d.Get("custom").(map[string]interface{}),
Custom: d.Get("custom_properties").(map[string]interface{}),
}
}

Expand All @@ -161,7 +161,7 @@ func resourceJobProfileRead(_ context.Context, d *schema.ResourceData, m interfa
_ = d.Set("date_created", jobProfile.DateCreated.Format(time.RFC3339))
_ = d.Set("date_modified", jobProfile.DateModified.Format(time.RFC3339))
_ = d.Set("name", jobProfile.Name)
_ = d.Set("custom", jobProfile.Custom)
_ = d.Set("custom_properties", jobProfile.Custom)

var inputParameters []map[string]interface{}
for _, inputParameter := range jobProfile.InputParameters {
Expand Down
8 changes: 4 additions & 4 deletions mcma/resource_job_profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ resource "mcma_job_profile" "job_profile_%s" {
name = "outparam2"
type = "number"
}
custom = {
custom_properties = {
customprop1 = "customprop1val"
customprop2 = "customprop2val"
}
Expand Down Expand Up @@ -122,7 +122,7 @@ resource "mcma_job_profile" "job_profile_%s_1" {
name = "outparam2"
type = "number"
}
custom = {
custom_properties = {
customprop1 = "customprop1val"
customprop2 = "customprop2val"
}
Expand All @@ -147,7 +147,7 @@ resource "mcma_job_profile" "job_profile_%s_2" {
name = "outparam4"
type = "number"
}
custom = {
custom_properties = {
customprop1 = "customprop3val"
customprop2 = "customprop4val"
}
Expand All @@ -172,7 +172,7 @@ resource "mcma_job_profile" "job_profile_%s_3" {
name = "outparam6"
type = "number"
}
custom = {
custom_properties = {
customprop1 = "customprop5val"
customprop2 = "customprop6val"
}
Expand Down

0 comments on commit b42ee2a

Please sign in to comment.