Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
Merge pull request #73 from dynatrace-oss/PCLOUDS-536-release-new-ver…
Browse files Browse the repository at this point in the history
…sion-of-log-forwarders

APM-379036 #52 ActiveGate state check fails for running ActiveGate
  • Loading branch information
dt-be authored Jul 28, 2022
2 parents 64b044f + 387065e commit 77ec487
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 37 deletions.
38 changes: 2 additions & 36 deletions dynatrace-aws-log-forwarder-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Resources:
Lambda:
Type: AWS::Lambda::Function
Properties:
FunctionName: !Join ["-", [!Ref AWS::StackName, "aws-log-fwd-function"]]
Code:
ZipFile: |
def handler(event, context):
Expand Down Expand Up @@ -88,7 +87,6 @@ Resources:
LambdaRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Join [".", [!Ref AWS::StackName, "aws-log-fwd.function-role"]]
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
Expand Down Expand Up @@ -123,8 +121,7 @@ Resources:

FirehoseLogStreams:
Type: AWS::KinesisFirehose::DeliveryStream
Properties:
DeliveryStreamName: !Join [".", [!Ref AWS::StackName, "aws-log-fwd.delivery-stream"]]
Properties:
DeliveryStreamType: DirectPut
ExtendedS3DestinationConfiguration:
BucketARN: !GetAtt DeliveryBucket.Arn
Expand All @@ -146,7 +143,6 @@ Resources:
DeliveryBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Join [".", [!Ref AWS::StackName, "aws-log-fwd.s3-bucket"]]
LifecycleConfiguration:
Rules:
- ExpirationInDays: '7'
Expand All @@ -160,7 +156,6 @@ Resources:
DeliveryStreamRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Join [".", [!Ref AWS::StackName, "aws-log-fwd.delivery-stream-role"]]
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
Expand Down Expand Up @@ -199,7 +194,6 @@ Resources:
CloudWatchLogsRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Join [".", [!Ref AWS::StackName, "aws-log-fwd.cloudwatch-logs-role"]]
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
Expand Down Expand Up @@ -593,7 +587,7 @@ Resources:
SecurityGroupIds: [ !Ref VPCSecurityGroup ]
Tags:
- Key: Name
Value: !Join [ ".", [ !Ref 'AWS::StackName', "aws-log-fwd.active-gate" ] ]
Value: !Join [ "-", [ !Ref 'AWS::StackName', "active-gate" ] ]
UserData:
Fn::Base64:
!Sub
Expand Down Expand Up @@ -640,9 +634,6 @@ Resources:
CidrBlock: "172.31.0.0/16"
EnableDnsSupport: true
EnableDnsHostnames: true
Tags:
- Key: Name
Value: !Join [ ".", [ !Ref 'AWS::StackName', "aws-log-fwd.active-gate" ] ]

VPCPublicSubnet:
Condition: DeployAGwithVPC
Expand All @@ -652,9 +643,6 @@ Resources:
AvailabilityZone: !Select [ 0, !GetAZs ]
CidrBlock: 172.31.1.0/27
MapPublicIpOnLaunch: true
Tags:
- Key: Name
Value: !Join [ ".", [ !Ref 'AWS::StackName', "aws-log-fwd.active-gate" ] ]

VPCPrivateSubnet:
Condition: DeployAGwithVPC
Expand All @@ -664,18 +652,11 @@ Resources:
AvailabilityZone: !Select [ 0, !GetAZs ]
CidrBlock: 172.31.2.0/27
MapPublicIpOnLaunch: false
Tags:
- Key: Name
Value: !Join [ ".", [ !Ref 'AWS::StackName', "aws-log-fwd.active-gate" ] ]

VPCInternetGateway:
Condition: DeployAGwithVPC
Type: AWS::EC2::InternetGateway
DependsOn: VPC
Properties:
Tags:
- Key: Name
Value: !Join [ ".", [ !Ref 'AWS::StackName', "aws-log-fwd.active-gate" ] ]

VPCInternetGatewayAttach:
Condition: DeployAGwithVPC
Expand All @@ -689,28 +670,19 @@ Resources:
Type: AWS::EC2::EIP
Properties:
Domain: VPC
Tags:
- Key: Name
Value: !Join [ ".", [ !Ref 'AWS::StackName', "aws-log-fwd.active-gate" ] ]

VPCNatGateway:
Condition: DeployAGwithVPC
Type: "AWS::EC2::NatGateway"
Properties:
AllocationId: !GetAtt VPCNatGatewayElasticIP.AllocationId
SubnetId: !Ref VPCPublicSubnet
Tags:
- Key: Name
Value: !Join [ ".", [ !Ref 'AWS::StackName', "aws-log-fwd.active-gate" ] ]

VPCPublicRouteTable:
Condition: DeployAGwithVPC
Type: AWS::EC2::RouteTable
Properties:
VpcId: !Ref VPC
Tags:
- Key: Name
Value: !Join [ ".", [ !Ref 'AWS::StackName', "aws-log-fwd.active-gate" ] ]

VPCPublicRouteInternet:
Condition: DeployAGwithVPC
Expand All @@ -733,9 +705,6 @@ Resources:
Type: AWS::EC2::RouteTable
Properties:
VpcId: !Ref VPC
Tags:
- Key: Name
Value: !Join [ ".", [ !Ref 'AWS::StackName', "aws-log-fwd.active-gate" ] ]

VPCPrivateRouteToNat:
Condition: DeployAGwithVPC
Expand All @@ -758,9 +727,6 @@ Resources:
Properties:
GroupDescription: Allow ActiveGate ingress
VpcId: !Ref VPC
Tags:
- Key: Name
Value: !Join [ ".", [ !Ref 'AWS::StackName', "aws-log-fwd.active-gate" ] ]

VPCSecurityGroupActiveGateInbound:
Condition: DeployAGwithVPC
Expand Down
2 changes: 1 addition & 1 deletion dynatrace-aws-logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ EOF

echo "Deploying stack $STACK_NAME. This might take up to 10 minutes."

aws cloudformation deploy --stack "$STACK_NAME" --template-file "$TEMPLATE_FILE" --capabilities CAPABILITY_NAMED_IAM \
aws cloudformation deploy --stack "$STACK_NAME" --template-file "$TEMPLATE_FILE" --capabilities CAPABILITY_IAM \
--parameter-overrides DynatraceEnvironmentUrl="$TARGET_URL" DynatraceApiKey="$TARGET_API_TOKEN" VerifySSLTargetActiveGate="$REQUIRE_VALID_CERTIFICATE" \
UseExistingActiveGate="$USE_EXISTING_ACTIVE_GATE" TenantId="$TENANT_ID" DynatracePaasToken="$TARGET_PAAS_TOKEN" \
--no-fail-on-empty-changeset
Expand Down

0 comments on commit 77ec487

Please sign in to comment.