Skip to content

Commit

Permalink
Merge pull request #63 from mercari/fix-app-name-validation-with-clou…
Browse files Browse the repository at this point in the history
…dprovider

Fix application name validation with cloudprovider input
  • Loading branch information
KeisukeYamashita authored Aug 14, 2020
2 parents 4f36af8 + ec1faf1 commit c970f3b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## v0.2.3 (Unreleased)
## v0.2.4 (Unreleased)

## v0.2.2 (Auguest 12, 2020)
## v0.2.3 (August 14, 2020)
### Bug fixes
* Fixed validation errors if the user uses deprecated `application` for `spinnaker_application` resource. [#63](https://github.com/mercari/terraform-provider-spinnaker/pull/63)

## v0.2.2 (August 12, 2020)
### Improvements
* Add `spinnaker_canary_config` resource/data source for defining canary config. ([#55](https://github.com/mercari/terraform-provider-spinnaker/pull/55))
* Note that this currently supports only Cloud Monitoring.
Expand Down
2 changes: 1 addition & 1 deletion spinnaker/api/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func NewCreateApplicationTask(d *schema.ResourceData) (CreateApplicationTask, er
cloudProviders := make([]string, len(input))
for k, input := range v.([]interface{}) {
cloudProvider := input.(string)
if err := validateSpinnakerApplicationNameByCloudProvider(d.Get("name").(string), cloudProvider); err != nil {
if err := validateSpinnakerApplicationNameByCloudProvider(GetApplicationName(d), cloudProvider); err != nil {
return nil, err
}

Expand Down
1 change: 1 addition & 0 deletions spinnaker/resource_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func resourceSpinnakerApplication() *schema.Resource {
Deprecated: "use `name` instead",
Optional: true,
ConflictsWith: []string{"name"},
ValidateFunc: validateSpinnakerApplicationName,
},
"name": {
Description: "Name of the Application",
Expand Down

0 comments on commit c970f3b

Please sign in to comment.