Skip to content
This repository was archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #184 from gessnerfl/feature/177_delete_rule_specif…
Browse files Browse the repository at this point in the history
…ic_resources

closes #177: resources deleted. documentation updated, unused code cleaned up
  • Loading branch information
gessnerfl authored Sep 10, 2023
2 parents 62e48e5 + 8913934 commit 1a3f349
Show file tree
Hide file tree
Showing 21 changed files with 105 additions and 2,982 deletions.
12 changes: 0 additions & 12 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,7 @@ resource.
* Global Application Alert Configuration - `instana_global_application_alert_config`
* Event Settings
* Custom Event Specification - `instana_custom_event_specification`
* Entity Verification Rule - `instana_custom_event_spec_entity_verification_rule`
* System Rule - `instana_custom_event_spec_system_rule`
* Threshold Rule - `instana_custom_event_spec_threshold_rule`
* Alerting Channels - `instana_alerting_channel`
* Email - `instana_alerting_channel_email`
* Google Chat - `instana_alerting_channel_google_chat`
* Office 365 - `instana_alerting_channel_office_365`
* OpsGenie - `instana_alerting_channel_ops_genie`
* Pager Duty - `instana_alerting_channel_pager_duty`
* Slack - `instana_alerting_channel_slack`
* Splunk - `instana_alerting_channel_splunk`
* VictorOps - `instana_alerting_channel_victor_ops`
* Webhook - `instana_alerting_channel_webhook`
* Alerting Config - `instana_alerting_config`
* Settings
* API Tokens - `instana_api_token`
Expand Down
52 changes: 0 additions & 52 deletions docs/resources/custom_event_spec_entity_verification_rule.md

This file was deleted.

42 changes: 0 additions & 42 deletions docs/resources/custom_event_spec_system_rule.md

This file was deleted.

123 changes: 0 additions & 123 deletions docs/resources/custom_event_spec_threshold_rule.md

This file was deleted.

3 changes: 0 additions & 3 deletions instana/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ func providerResources() map[string]*schema.Resource {
bindResourceHandle(resources, NewApplicationAlertConfigResourceHandle())
bindResourceHandle(resources, NewGlobalApplicationAlertConfigResourceHandle())
bindResourceHandle(resources, NewCustomEventSpecificationResourceHandle())
bindResourceHandle(resources, NewCustomEventSpecificationWithSystemRuleResourceHandle())
bindResourceHandle(resources, NewCustomEventSpecificationWithThresholdRuleResourceHandle())
bindResourceHandle(resources, NewCustomEventSpecificationWithEntityVerificationRuleResourceHandle())
bindResourceHandle(resources, NewAlertingChannelResourceHandle())
bindResourceHandle(resources, NewAlertingConfigResourceHandle())
bindResourceHandle(resources, NewSliConfigResourceHandle())
Expand Down
11 changes: 1 addition & 10 deletions instana/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

. "github.com/gessnerfl/terraform-provider-instana/instana"
"github.com/gessnerfl/terraform-provider-instana/testutils"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/stretchr/testify/assert"
)

Expand All @@ -30,7 +29,7 @@ func TestProviderShouldContainValidSchemaDefinition(t *testing.T) {
func TestProviderShouldContainValidResourceDefinitions(t *testing.T) {
config := Provider()

assert.Equal(t, 16, len(config.ResourcesMap))
assert.Equal(t, 13, len(config.ResourcesMap))

assert.NotNil(t, config.ResourcesMap[ResourceInstanaAPIToken])
assert.NotNil(t, config.ResourcesMap[ResourceInstanaApplicationConfig])
Expand All @@ -45,14 +44,6 @@ func TestProviderShouldContainValidResourceDefinitions(t *testing.T) {
assert.NotNil(t, config.ResourcesMap[ResourceInstanaCustomEventSpecification])
assert.NotNil(t, config.ResourcesMap[ResourceInstanaAlertingChannel])
assert.NotNil(t, config.ResourcesMap[ResourceInstanaAlertingConfig])

validateResourcesMapForCustomEvents(config.ResourcesMap, t)
}

func validateResourcesMapForCustomEvents(resourceMap map[string]*schema.Resource, t *testing.T) {
assert.NotNil(t, resourceMap[ResourceInstanaCustomEventSpecificationSystemRule])
assert.NotNil(t, resourceMap[ResourceInstanaCustomEventSpecificationThresholdRule])
assert.NotNil(t, resourceMap[ResourceInstanaCustomEventSpecificationEntityVerificationRule])
}

func TestProviderShouldContainValidDataSourceDefinitions(t *testing.T) {
Expand Down
Loading

0 comments on commit 1a3f349

Please sign in to comment.