Skip to content

Commit

Permalink
Merge branch 'main' into feat/golden_state
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinhard-Pilz-Dynatrace committed Sep 6, 2024
2 parents be40ae0 + a7a304b commit 07711fd
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"enums": {},
"maxObjects": 100,
"metadata": {
"appName": "Kubernetes Automation for Workflows"
"appName": "Kubernetes Automation (Preview)"
},
"multiObject": true,
"ordered": false,
Expand Down Expand Up @@ -135,5 +135,5 @@
]
}
},
"version": "0.1.8"
"version": "0.1.9"
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/dynatrace-oss/terraform-provider-dynatrace/dynatrace/settings/services/settings20"
)

const SchemaVersion = "0.1.8"
const SchemaVersion = "0.1.9"
const SchemaID = "app:dynatrace.kubernetes.connector:connection"

func Service(credentials *settings.Credentials) settings.CRUDService[*connection.Settings] {
Expand Down
2 changes: 2 additions & 0 deletions dynatrace/api/v1/config/customservices/settings/enums.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func (me QueueEntryPointType) Ref() *QueueEntryPointType {

// QueueEntryPointTypes offers the known enum values
var QueueEntryPointTypes = struct {
AWSSQS QueueEntryPointType
IBMMQ QueueEntryPointType
Jms QueueEntryPointType
Kafka QueueEntryPointType
Expand All @@ -34,6 +35,7 @@ var QueueEntryPointTypes = struct {
AzureServiceBus QueueEntryPointType
Values func() []string
}{
"AWS_SQS",
"IBM_MQ",
"JMS",
"KAFKA",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ var Attributes = struct {
MobileApplicationPlatform Attribute
MobileApplicationTags Attribute
NameOfComputeNode Attribute
NetworkAvailabilityMonitorName Attribute
NetworkAvailabilityMonitorTags Attribute
OpenStackAccountName Attribute
OpenStackAccountProjectName Attribute
OpenStackAvailabilityZoneName Attribute
Expand Down Expand Up @@ -364,6 +366,8 @@ var Attributes = struct {
"MOBILE_APPLICATION_PLATFORM",
"MOBILE_APPLICATION_TAGS",
"NAME_OF_COMPUTE_NODE",
"NETWORK_AVAILABILITY_MONITOR_NAME",
"NETWORK_AVAILABILITY_MONITOR_TAGS",
"OPENSTACK_ACCOUNT_NAME",
"OPENSTACK_ACCOUNT_PROJECT_NAME",
"OPENSTACK_AVAILABILITY_ZONE_NAME",
Expand Down
12 changes: 12 additions & 0 deletions dynatrace/api/v1/config/requestattributes/settings/enums.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ type Source string

// Sources offers the known enum values
var Sources = struct {
CICSPathName Source
CICSSdk Source
CICSSystemId Source
CICSTaskId Source
Expand Down Expand Up @@ -135,6 +136,7 @@ var Sources = struct {
WebserviceMethod Source
WebserviceName Source
}{
"CICS_PATH_NAME",
"CICS_SDK",
"CICS_SYSTEM_ID",
"CICS_TASK_ID",
Expand Down Expand Up @@ -472,6 +474,8 @@ var ServiceTechnologys = struct {
AWSLambda ServiceTechnology
AWSRds ServiceTechnology
AWSService ServiceTechnology
AWSSNSClient ServiceTechnology
AWSSQS ServiceTechnology
Axis ServiceTechnology
AzureFunctions ServiceTechnology
AzureServiceBus ServiceTechnology
Expand Down Expand Up @@ -575,6 +579,8 @@ var ServiceTechnologys = struct {
Micronaut ServiceTechnology
MicrosoftSQLServer ServiceTechnology
Mongodb ServiceTechnology
MongodbClient ServiceTechnology
MongodbClientDotNet ServiceTechnology
MSSQLClient ServiceTechnology
MuleEsb ServiceTechnology
MySQL ServiceTechnology
Expand Down Expand Up @@ -626,6 +632,7 @@ var ServiceTechnologys = struct {
SAPMaxdb ServiceTechnology
SAPSybase ServiceTechnology
Scala ServiceTechnology
SecuritySoftware ServiceTechnology
Selinux ServiceTechnology
Sharepoint ServiceTechnology
Shell ServiceTechnology
Expand Down Expand Up @@ -686,6 +693,8 @@ var ServiceTechnologys = struct {
"AWS_LAMBDA",
"AWS_RDS",
"AWS_SERVICE",
"AWS_SNS_CLIENT",
"AWS_SQS",
"AXIS",
"AZURE_FUNCTIONS",
"AZURE_SERVICE_BUS",
Expand Down Expand Up @@ -789,6 +798,8 @@ var ServiceTechnologys = struct {
"MICRONAUT",
"MICROSOFT_SQL_SERVER",
"MONGODB",
"MONGODB_CLIENT",
"MONGODB_CLIENT_DOTNET",
"MSSQL_CLIENT",
"MULE_ESB",
"MYSQL",
Expand Down Expand Up @@ -840,6 +851,7 @@ var ServiceTechnologys = struct {
"SAP_MAXDB",
"SAP_SYBASE",
"SCALA",
"SECURITY_SOFTWARE",
"SELINUX",
"SHAREPOINT",
"SHELL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,24 @@ func (me *SyntheticMonitor) UnmarshalHCL(decoder hcl.Decoder) error {
if value, ok := decoder.GetOk("enabled"); ok {
me.Enabled = value.(bool)
}
if _, ok := decoder.GetOk("tags.#"); ok {
me.Tags = monitors.TagsWithSourceInfo{}
if err := me.Tags.UnmarshalHCL(hcl.NewDecoder(decoder, "tags", 0)); err != nil {
return err
}
}
if err := decoder.Decode("tags", &me.Tags); err != nil {
return err
}
if me.Tags != nil {
// bug in terraform forces us to filter out "empty" entries
var finalTags monitors.TagsWithSourceInfo
for _, tag := range me.Tags {
if tag == nil {
continue
}
if len(tag.Context) == 0 && len(tag.Key) == 0 && (tag.Source == nil || len(*tag.Source) == 0) && (tag.Value == nil || len(*tag.Value) == 0) {
continue
}
finalTags = append(finalTags, tag)
}
me.Tags = finalTags
}

if err := decoder.Decode("anomaly_detection", &me.AnomalyDetection); err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion dynatrace/export/dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ func (me *entityds) Replace(environment *Environment, s string, replacingIn Reso
s = m1.ReplaceAllStringFunc(s, func(id string) string {
dataSource := environment.Module(replacingIn).DataSource(id, DataSourceKindEntity)
if dataSource == nil {
return s
return id
}
found = true
if me.Coalesce {
Expand Down
11 changes: 8 additions & 3 deletions dynatrace/export/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,14 @@ func (me *Environment) InitialDownload() error {

keys := me.ResArgs[sResourceType]
module := me.Module(ResourceType(sResourceType))
if err := module.Download(parallel, keys...); err != nil {
return err
}
// removed error check here
// when downloading non-parallel returning an error
// just because one of the modules is failing
// exits the export too early
//
// the multithreaded export also just flags failed
// modules as erronneous but doesn't exit
module.Download(parallel, keys...)
}
}

Expand Down

0 comments on commit 07711fd

Please sign in to comment.